Import Cobalt 19.master.0.203780

Includes the following patches:
  https://cobalt-review.googlesource.com/c/cobalt/+/5210
    by errong.leng@samsung.com
  https://cobalt-review.googlesource.com/c/cobalt/+/5270
    by linus.wang@samsung.com
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/NextIncludes/rewrite-includes9.h b/src/third_party/llvm-project/clang/test/Frontend/Inputs/NextIncludes/rewrite-includes9.h
new file mode 100644
index 0000000..b074bd1
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/NextIncludes/rewrite-includes9.h
@@ -0,0 +1 @@
+included_line9
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/SystemHeaderPrefix/libs/boost/all.h b/src/third_party/llvm-project/clang/test/Frontend/Inputs/SystemHeaderPrefix/libs/boost/all.h
new file mode 100644
index 0000000..0f3f0be
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/SystemHeaderPrefix/libs/boost/all.h
@@ -0,0 +1 @@
+#include "warn.h"
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/SystemHeaderPrefix/libs/boost/warn.h b/src/third_party/llvm-project/clang/test/Frontend/Inputs/SystemHeaderPrefix/libs/boost/warn.h
new file mode 100644
index 0000000..def881a
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/SystemHeaderPrefix/libs/boost/warn.h
@@ -0,0 +1,2 @@
+#if BOOST
+#endif
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/SystemHeaderPrefix/libs/mylib/all.h b/src/third_party/llvm-project/clang/test/Frontend/Inputs/SystemHeaderPrefix/libs/mylib/all.h
new file mode 100644
index 0000000..0f3f0be
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/SystemHeaderPrefix/libs/mylib/all.h
@@ -0,0 +1 @@
+#include "warn.h"
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/SystemHeaderPrefix/libs/mylib/warn.h b/src/third_party/llvm-project/clang/test/Frontend/Inputs/SystemHeaderPrefix/libs/mylib/warn.h
new file mode 100644
index 0000000..6a0c102
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/SystemHeaderPrefix/libs/mylib/warn.h
@@ -0,0 +1,2 @@
+#if MYLIB
+#endif
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/SystemHeaderPrefix/line-directive-in-system.h b/src/third_party/llvm-project/clang/test/Frontend/Inputs/SystemHeaderPrefix/line-directive-in-system.h
new file mode 100644
index 0000000..c4c15e5
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/SystemHeaderPrefix/line-directive-in-system.h
@@ -0,0 +1,2 @@
+#line 1 "foo.h"
+foo();
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/SystemHeaderPrefix/noline.h b/src/third_party/llvm-project/clang/test/Frontend/Inputs/SystemHeaderPrefix/noline.h
new file mode 100644
index 0000000..a280f9a
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/SystemHeaderPrefix/noline.h
@@ -0,0 +1 @@
+foo();
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/SystemHeaderPrefix/src/all.h b/src/third_party/llvm-project/clang/test/Frontend/Inputs/SystemHeaderPrefix/src/all.h
new file mode 100644
index 0000000..ace9699
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/SystemHeaderPrefix/src/all.h
@@ -0,0 +1,6 @@
+#include "libs/boost/all.h"
+#include "libs/mylib/all.h"
+
+#include "libs/boost/warn.h"
+#include "libs/mylib/warn.h"
+#include "src/warn.h"
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/SystemHeaderPrefix/src/warn.h b/src/third_party/llvm-project/clang/test/Frontend/Inputs/SystemHeaderPrefix/src/warn.h
new file mode 100644
index 0000000..91e2591
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/SystemHeaderPrefix/src/warn.h
@@ -0,0 +1,2 @@
+#if SRC
+#endif
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/SystemHeaderPrefix/with-header-guard.h b/src/third_party/llvm-project/clang/test/Frontend/Inputs/SystemHeaderPrefix/with-header-guard.h
new file mode 100644
index 0000000..7e4b669
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/SystemHeaderPrefix/with-header-guard.h
@@ -0,0 +1,3 @@
+#ifndef HEADER_GUARD
+#define HEADER_GUARD
+#endif
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/TestFramework.framework/Headers/TestFramework.h b/src/third_party/llvm-project/clang/test/Frontend/Inputs/TestFramework.framework/Headers/TestFramework.h
new file mode 100644
index 0000000..49048ca
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/TestFramework.framework/Headers/TestFramework.h
@@ -0,0 +1 @@
+static int f0(void) {}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/absolute-paths.h b/src/third_party/llvm-project/clang/test/Frontend/Inputs/absolute-paths.h
new file mode 100644
index 0000000..5e682c7
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/absolute-paths.h
@@ -0,0 +1,3 @@
+int f() {
+  // Oops, no return.
+}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/empty.h b/src/third_party/llvm-project/clang/test/Frontend/Inputs/empty.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/empty.h
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/line-directive.h b/src/third_party/llvm-project/clang/test/Frontend/Inputs/line-directive.h
new file mode 100644
index 0000000..e05e9f5
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/line-directive.h
@@ -0,0 +1,2 @@
+#line 10 "foo.h"
+foo(); // will warn if not treated as a system header
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/optimization-remark-with-hotness-sample.proftext b/src/third_party/llvm-project/clang/test/Frontend/Inputs/optimization-remark-with-hotness-sample.proftext
new file mode 100644
index 0000000..0eef9bd
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/optimization-remark-with-hotness-sample.proftext
@@ -0,0 +1,7 @@
+foo:29:29
+ 0: 29
+bar:29:29
+ 8: 29 foo:29
+main:29:1
+ 3: 29 bar:29
+
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/optimization-remark-with-hotness.proftext b/src/third_party/llvm-project/clang/test/Frontend/Inputs/optimization-remark-with-hotness.proftext
new file mode 100644
index 0000000..4ed20ab
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/optimization-remark-with-hotness.proftext
@@ -0,0 +1,25 @@
+foo
+# Func Hash:
+24
+# Num Counters:
+1
+# Counter Values:
+30
+
+bar
+# Func Hash:
+0
+# Num Counters:
+1
+# Counter Values:
+30
+
+main
+# Func Hash:
+1160280
+# Num Counters:
+2
+# Counter Values:
+1
+30
+
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/profile-sample-use-loc-tracking.prof b/src/third_party/llvm-project/clang/test/Frontend/Inputs/profile-sample-use-loc-tracking.prof
new file mode 100644
index 0000000..c5b8d9e
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/profile-sample-use-loc-tracking.prof
@@ -0,0 +1,2 @@
+bar:100:100
+ 1: 2000
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/resource_dir_with_cfi_blacklist/share/cfi_blacklist.txt b/src/third_party/llvm-project/clang/test/Frontend/Inputs/resource_dir_with_cfi_blacklist/share/cfi_blacklist.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/resource_dir_with_cfi_blacklist/share/cfi_blacklist.txt
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes-bom.h b/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes-bom.h
new file mode 100644
index 0000000..7ba011f
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes-bom.h
@@ -0,0 +1 @@
+// This file starts with UTF-8 BOM marker.
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes-messages.h b/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes-messages.h
new file mode 100644
index 0000000..e5f0eb2
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes-messages.h
@@ -0,0 +1,4 @@
+void f()
+{
+    int unused_variable;
+}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes1.h b/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes1.h
new file mode 100644
index 0000000..1b6c80d
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes1.h
@@ -0,0 +1,3 @@
+#pragma clang system_header
+included_line1
+#include "rewrite-includes2.h"
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes2.h b/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes2.h
new file mode 100644
index 0000000..1114e51
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes2.h
@@ -0,0 +1 @@
+included_line2
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes3.h b/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes3.h
new file mode 100644
index 0000000..3757bc8
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes3.h
@@ -0,0 +1 @@
+included_line3
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes4.h b/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes4.h
new file mode 100644
index 0000000..b4e25d2
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes4.h
@@ -0,0 +1 @@
+included_line4
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes5.h b/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes5.h
new file mode 100644
index 0000000..934bf41
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes5.h
@@ -0,0 +1 @@
+included_line5
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes6.h b/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes6.h
new file mode 100644
index 0000000..c18e501
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes6.h
@@ -0,0 +1,2 @@
+#pragma once
+included_line6
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes7.h b/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes7.h
new file mode 100644
index 0000000..da00d4f
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes7.h
@@ -0,0 +1,4 @@
+#ifndef REWRITE_INCLUDES_7
+#define REWRITE_INCLUDES_7
+included_line7
+#endif
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes8.h b/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes8.h
new file mode 100644
index 0000000..e827ad9
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes8.h
@@ -0,0 +1,5 @@
+#if __has_include_next(<rewrite-includes8.h>)
+#elif __has_include(<rewrite-includes8.hfail>)
+#endif
+#if !__has_include("rewrite-includes8.h")
+#endif
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes9.h b/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes9.h
new file mode 100644
index 0000000..ebd5ada
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/rewrite-includes9.h
@@ -0,0 +1,3 @@
+#if __has_include_next(<rewrite-includes9.h>)
+#include_next <rewrite-includes9.h>
+#endif
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/test.h b/src/third_party/llvm-project/clang/test/Frontend/Inputs/test.h
new file mode 100644
index 0000000..98cc459
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/test.h
@@ -0,0 +1 @@
+#include "test2.h"
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/test2.h b/src/third_party/llvm-project/clang/test/Frontend/Inputs/test2.h
new file mode 100644
index 0000000..6d1a0d4
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/test2.h
@@ -0,0 +1 @@
+int x;
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Inputs/test3.h b/src/third_party/llvm-project/clang/test/Frontend/Inputs/test3.h
new file mode 100644
index 0000000..92ff4b8
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Inputs/test3.h
@@ -0,0 +1 @@
+int y;
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Weverything.c b/src/third_party/llvm-project/clang/test/Frontend/Weverything.c
new file mode 100644
index 0000000..32f3147
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Weverything.c
@@ -0,0 +1,9 @@
+// Regression check that -pedantic-errors doesn't cause other diagnostics to
+// become errors.
+//
+// RUN: %clang_cc1 -verify -Weverything -pedantic-errors %s
+
+int f0(int, unsigned);
+int f0(int x, unsigned y) {
+  return x < y; // expected-warning {{comparison of integers}}
+}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/Wno-everything.c b/src/third_party/llvm-project/clang/test/Frontend/Wno-everything.c
new file mode 100644
index 0000000..ca70ca4
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/Wno-everything.c
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -verify -Wno-everything -Wsign-compare %s
+
+int f0(int, unsigned);
+int f0(int x, unsigned y) {
+  if (x=3);
+  return x < y; // expected-warning {{comparison of integers}}
+}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/aarch64-target-cpu.c b/src/third_party/llvm-project/clang/test/Frontend/aarch64-target-cpu.c
new file mode 100644
index 0000000..c803694
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/aarch64-target-cpu.c
@@ -0,0 +1,14 @@
+// Ensure we support the various CPU names.
+//
+// RUN: %clang_cc1 -triple aarch64-unknown-unknown -target-cpu cortex-a35 -verify %s
+// RUN: %clang_cc1 -triple aarch64-unknown-unknown -target-cpu cortex-a53 -verify %s
+// RUN: %clang_cc1 -triple aarch64-unknown-unknown -target-cpu cortex-a57 -verify %s
+// RUN: %clang_cc1 -triple aarch64-unknown-unknown -target-cpu cortex-a72 -verify %s
+// RUN: %clang_cc1 -triple aarch64-unknown-unknown -target-cpu cortex-a73 -verify %s
+// RUN: %clang_cc1 -triple aarch64-unknown-unknown -target-cpu cyclone -verify %s
+// RUN: %clang_cc1 -triple aarch64-unknown-unknown -target-cpu exynos-m1 -verify %s
+// RUN: %clang_cc1 -triple aarch64-unknown-unknown -target-cpu generic -verify %s
+// RUN: %clang_cc1 -triple aarch64-unknown-unknown -target-cpu kryo -verify %s
+// RUN: %clang_cc1 -triple aarch64-unknown-unknown -target-cpu thunderx2t99 -verify %s
+//
+// expected-no-diagnostics
diff --git a/src/third_party/llvm-project/clang/test/Frontend/absolute-paths.c b/src/third_party/llvm-project/clang/test/Frontend/absolute-paths.c
new file mode 100644
index 0000000..4782162
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/absolute-paths.c
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -fsyntax-only -I %S/Inputs/SystemHeaderPrefix/.. %s 2>&1 | FileCheck -check-prefix=NORMAL -check-prefix=CHECK %s
+// RUN: %clang_cc1 -fsyntax-only -I %S/Inputs/SystemHeaderPrefix/.. -fdiagnostics-absolute-paths %s 2>&1 | FileCheck -check-prefix=ABSOLUTE -check-prefix=CHECK %s
+
+#include "absolute-paths.h"
+
+// Check whether the diagnostic from the header above includes the dummy
+// directory in the path.
+// NORMAL: SystemHeaderPrefix
+// ABSOLUTE-NOT: SystemHeaderPrefix
+// CHECK: warning: control reaches end of non-void function
+
+
+// For files which don't exist, just print the filename.
+#line 123 "non-existant.c"
+int g() {}
+// NORMAL: non-existant.c:123:10: warning: control reaches end of non-void function
+// ABSOLUTE: non-existant.c:123:10: warning: control reaches end of non-void function
diff --git a/src/third_party/llvm-project/clang/test/Frontend/ast-codegen.c b/src/third_party/llvm-project/clang/test/Frontend/ast-codegen.c
new file mode 100644
index 0000000..e1140fd
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/ast-codegen.c
@@ -0,0 +1,13 @@
+// REQUIRES: x86-registered-target
+// RUN: %clang -target i386-unknown-unknown -emit-ast -o %t.ast %s
+// RUN: %clang -target i386-unknown-unknown -emit-llvm -S -o - %t.ast | FileCheck %s
+
+// CHECK: module asm "foo"
+__asm__("foo");
+
+// CHECK: @g0 = common dso_local global i32 0, align 4
+int g0;
+
+// CHECK: define dso_local i32 @f0()
+int f0() {
+}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/ast-main.c b/src/third_party/llvm-project/clang/test/Frontend/ast-main.c
new file mode 100644
index 0000000..43237a1
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/ast-main.c
@@ -0,0 +1,8 @@
+// RUN: %clang -emit-llvm -S -o %t1.ll -x c - < %s
+// RUN: %clang -emit-ast -o %t.ast %s
+// RUN: %clang -emit-llvm -S -o %t2.ll -x ast - < %t.ast
+// RUN: diff %t1.ll %t2.ll
+
+int main() {
+  return 0;
+}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/ast-main.cpp b/src/third_party/llvm-project/clang/test/Frontend/ast-main.cpp
new file mode 100644
index 0000000..4bddbe1
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/ast-main.cpp
@@ -0,0 +1,22 @@
+// RUN: %clang -emit-llvm -S -o %t1.ll -x c++ - < %s
+// RUN: %clang -fno-delayed-template-parsing -emit-ast -o %t.ast %s
+// RUN: %clang -emit-llvm -S -o %t2.ll -x ast - < %t.ast
+// RUN: diff %t1.ll %t2.ll
+
+// http://llvm.org/bugs/show_bug.cgi?id=15377
+template<typename T>
+struct S {
+    T *mf();
+};
+template<typename T>
+T *S<T>::mf() {
+    // warning: control reaches end of non-void function [-Wreturn-type]
+}
+
+void f() {
+    S<int>().mf();
+}
+
+int main() {
+  return 0;
+}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/backend-diagnostic.c b/src/third_party/llvm-project/clang/test/Frontend/backend-diagnostic.c
new file mode 100644
index 0000000..1fe4fdb
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/backend-diagnostic.c
@@ -0,0 +1,31 @@
+// REQUIRES: x86-registered-target
+// Play around with backend reporting:
+// _REGULAR_: Regular behavior, no warning switch enabled.
+// _PROMOTE_: Promote warning to error.
+// _IGNORE_: Drop backend warning.
+//
+// RUN: not %clang_cc1 %s -mllvm -warn-stack-size=0 -no-integrated-as -S -o - -triple=i386-apple-darwin 2> %t.err
+// RUN: FileCheck < %t.err %s --check-prefix=REGULAR --check-prefix=ASM
+// RUN: not %clang_cc1 %s -mllvm -warn-stack-size=0 -no-integrated-as -S -o - -triple=i386-apple-darwin -Werror=frame-larger-than= 2> %t.err
+// RUN: FileCheck < %t.err %s --check-prefix=PROMOTE --check-prefix=ASM
+// RUN: not %clang_cc1 %s -mllvm -warn-stack-size=0 -no-integrated-as -S -o - -triple=i386-apple-darwin -Wno-frame-larger-than= 2> %t.err
+// RUN: FileCheck < %t.err %s --check-prefix=IGNORE --check-prefix=ASM
+//
+// RUN: %clang_cc1 %s -S -o - -triple=i386-apple-darwin -verify -no-integrated-as
+
+extern void doIt(char *);
+
+// REGULAR: warning: stack frame size of {{[0-9]+}} bytes in function 'stackSizeWarning'
+// PROMOTE: error: stack frame size of {{[0-9]+}} bytes in function 'stackSizeWarning'
+// IGNORE-NOT: stack frame size of {{[0-9]+}} bytes in function 'stackSizeWarning'
+void stackSizeWarning() {
+  char buffer[80];
+  doIt(buffer);
+}
+
+// ASM: inline assembly requires more registers than available
+void inlineAsmError(int x0, int x1, int x2, int x3, int x4,
+                    int x5, int x6, int x7, int x8, int x9) {
+  __asm__("hello world": : "r" (x0),"r" (x1),"r" (x2),"r" (x3), // expected-error + {{inline assembly requires more registers than available}}
+          "r" (x4),"r" (x5),"r" (x6),"r" (x7),"r" (x8),"r" (x9));
+}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/cc1-return-codes.c b/src/third_party/llvm-project/clang/test/Frontend/cc1-return-codes.c
new file mode 100644
index 0000000..da329b9
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/cc1-return-codes.c
@@ -0,0 +1,4 @@
+// cc1 immediate arguments (arguments which displays information and exits)
+// shall exit indicating success (return code 0)
+// RUN: %clang -cc1 -help
+// RUN: %clang -cc1 -version
diff --git a/src/third_party/llvm-project/clang/test/Frontend/clang-abi-compat.cpp b/src/third_party/llvm-project/clang/test/Frontend/clang-abi-compat.cpp
new file mode 100644
index 0000000..b7f2758
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/clang-abi-compat.cpp
@@ -0,0 +1,15 @@
+// RUN: not %clang_cc1 -fclang-abi-compat=banana %s -fsyntax-only 2>&1 | FileCheck --check-prefix=INVALID %s
+// RUN: not %clang_cc1 -fclang-abi-compat=2.9 %s -fsyntax-only 2>&1 | FileCheck --check-prefix=INVALID %s
+// RUN: not %clang_cc1 -fclang-abi-compat=42 %s -fsyntax-only 2>&1 | FileCheck --check-prefix=INVALID %s
+// RUN: not %clang_cc1 -fclang-abi-compat=3.10 %s -fsyntax-only 2>&1 | FileCheck --check-prefix=INVALID %s
+// RUN: not %clang_cc1 -fclang-abi-compat=4.1 %s -fsyntax-only 2>&1 | FileCheck --check-prefix=INVALID %s
+// RUN: not %clang_cc1 -fclang-abi-compat=04 %s -fsyntax-only 2>&1 | FileCheck --check-prefix=INVALID %s
+// RUN: not %clang_cc1 -fclang-abi-compat=4. %s -fsyntax-only 2>&1 | FileCheck --check-prefix=INVALID %s
+// RUN: not %clang_cc1 -fclang-abi-compat=4.00 %s -fsyntax-only 2>&1 | FileCheck --check-prefix=INVALID %s
+// INVALID: error: invalid value '{{.*}}' in '-fclang-abi-compat={{.*}}'
+//
+// RUN: %clang_cc1 -fclang-abi-compat=3.0 %s -fsyntax-only
+// RUN: %clang_cc1 -fclang-abi-compat=3.9 %s -fsyntax-only
+// RUN: %clang_cc1 -fclang-abi-compat=4 %s -fsyntax-only
+// RUN: %clang_cc1 -fclang-abi-compat=4.0 %s -fsyntax-only
+// RUN: %clang_cc1 -fclang-abi-compat=latest %s -fsyntax-only
diff --git a/src/third_party/llvm-project/clang/test/Frontend/compiler-options-dump.cpp b/src/third_party/llvm-project/clang/test/Frontend/compiler-options-dump.cpp
new file mode 100644
index 0000000..daa8bb1
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/compiler-options-dump.cpp
@@ -0,0 +1,25 @@
+// RUN: %clang_cc1 -compiler-options-dump -std=c++03 %s -o - | FileCheck %s --check-prefix=CXX03
+// RUN: %clang_cc1 -compiler-options-dump -std=c++17 %s -o - | FileCheck %s --check-prefix=CXX17
+// RUN: %clang_cc1 -compiler-options-dump -std=c99 -x c %s -o - | FileCheck %s --check-prefix=C99
+
+// CXX03: "features"
+// CXX03: "cxx_auto_type" : false
+// CXX03: "cxx_range_for" : false
+// CXX03: "extensions"
+// CXX03: "cxx_range_for" : true
+
+// CXX17: "features"
+// CXX17: "cxx_auto_type" : true
+// CXX17: "cxx_range_for" : true
+// CXX17: "extensions"
+// CXX17: "cxx_range_for" : true
+
+// C99: "features"
+// C99: "c_alignas" : false
+// C99: "c_atomic" : false
+// C99: "cxx_auto_type" : false
+// C99: "cxx_range_for" : false
+// C99: "extensions"
+// C99: "c_alignas" : true
+// C99: "c_atomic" : true
+// C99: "cxx_range_for" : false
diff --git a/src/third_party/llvm-project/clang/test/Frontend/cpp-output.c b/src/third_party/llvm-project/clang/test/Frontend/cpp-output.c
new file mode 100644
index 0000000..e44095b
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/cpp-output.c
@@ -0,0 +1,14 @@
+// RUN: %clang -E -o %t -C %s
+// RUN: grep '^int x; // comment' %t
+// RUN: grep '^x x' %t
+// RUN: %clang -E -o %t -CC %s
+// RUN: grep '^int x; // comment' %t
+// RUN: grep '^x /\* comment \*/ x /\* comment \*/' %t
+
+int x; // comment
+
+#define A(foo, bar) foo bar
+#define B x // comment 
+
+A(B, B)
+
diff --git a/src/third_party/llvm-project/clang/test/Frontend/darwin-eabi.c b/src/third_party/llvm-project/clang/test/Frontend/darwin-eabi.c
new file mode 100644
index 0000000..27471e6
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/darwin-eabi.c
@@ -0,0 +1,7 @@
+// RUN: %clang -arch armv6m -dM -E %s | FileCheck %s
+// RUN: %clang -arch armv7m -dM -E %s | FileCheck %s
+// RUN: %clang -arch armv7em -dM -E %s | FileCheck %s
+// RUN: %clang_cc1 -triple thumbv7m-apple-unknown-macho -dM -E %s | FileCheck %s
+
+// CHECK-NOT: __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__
+// CHECK-NOT: __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
diff --git a/src/third_party/llvm-project/clang/test/Frontend/darwin-version.c b/src/third_party/llvm-project/clang/test/Frontend/darwin-version.c
new file mode 100644
index 0000000..eb05a48
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/darwin-version.c
@@ -0,0 +1,53 @@
+// RUN: %clang_cc1 -triple armv6-apple-ios3.0.0 -dM -E -o %t %s
+// RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | grep '30000' | count 1
+// RUN: not grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t
+// RUN: %clang_cc1 -triple armv6-apple-ios2.0.0 -dM -E -o %t %s
+// RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | grep '20000' | count 1
+// RUN: not grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t
+// RUN: %clang_cc1 -triple armv6-apple-ios2.2.0 -dM -E -o %t %s
+// RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | grep '20200' | count 1
+// RUN: not grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t
+// RUN: %clang_cc1 -triple armv6-apple-ios2.3.1 -dM -E -o %t %s
+// RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | grep '20301' | count 1
+// RUN: not grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t
+// RUN: %clang_cc1 -triple armv7-apple-ios10.1.2 -dM -E -o %t %s
+// RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | grep '100102' | count 1
+// RUN: %clang_cc1 -triple i386-apple-macosx10.4.0 -dM -E -o %t %s
+// RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1040' | count 1
+// RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t
+// RUN: not grep '__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__' %t
+// RUN: not grep '__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__' %t
+// RUN: %clang_cc1 -triple i386-apple-macosx10.4.10 -dM -E -o %t %s
+// RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1049' | count 1
+// RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t
+// RUN: %clang_cc1 -triple i386-apple-macosx10.5.0 -dM -E -o %t %s
+// RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1050' | count 1
+// RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t
+// RUN: %clang_cc1 -triple i386-apple-macosx10.6.0 -dM -E -o %t %s
+// RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1060' | count 1
+// RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.10.0 -dM -E -o %t %s
+// RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '101000' | count 1
+// RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t
+
+// RUN: %clang_cc1 -triple arm64-apple-tvos8.3 -dM -E -o %t %s
+// RUN: grep '__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__' %t | grep '80300' | count 1
+// RUN: not grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t
+// RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t
+// RUN: %clang_cc1 -triple arm64-apple-tvos10.2.3 -dM -E -o %t %s
+// RUN: grep '__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__' %t | grep '100203' | count 1
+
+// RUN: %clang_cc1 -triple x86_64-apple-tvos8.3 -dM -E -o %t %s
+// RUN: grep '__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__' %t | grep '80300' | count 1
+// RUN: not grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t
+// RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t
+
+// RUN: %clang_cc1 -triple armv7k-apple-watchos2.1 -dM -E -o %t %s
+// RUN: grep '__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__' %t | grep '20100' | count 1
+// RUN: not grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t
+// RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t
+
+// RUN: %clang_cc1 -triple i386-apple-watchos2.1 -dM -E -o %t %s
+// RUN: grep '__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__' %t | grep '20100' | count 1
+// RUN: not grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t
+// RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t
diff --git a/src/third_party/llvm-project/clang/test/Frontend/dependency-gen-escaping.c b/src/third_party/llvm-project/clang/test/Frontend/dependency-gen-escaping.c
new file mode 100644
index 0000000..c8d1191
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/dependency-gen-escaping.c
@@ -0,0 +1,31 @@
+// PR15642
+// RUN: %clang -M -MG -fno-ms-compatibility %s | FileCheck -strict-whitespace %s --check-prefix=CHECK --check-prefix=SEP2F
+// RUN: %clang -M -MG -fms-compatibility %s | FileCheck -strict-whitespace %s --check-prefix=CHECK --check-prefix=SEP5C
+// RUN: %clang -M -MG -MV %s | FileCheck -strict-whitespace %s --check-prefix=NMAKE
+
+// CHECK: \ \ \ \ .h
+// CHECK: $$$$.h
+// CHECK: \#\#.h
+// NMAKE: "    .h"
+// NMAKE: "$$.h"
+// NMAKE: "##.h"
+// NMAKE-NOT: "
+// NMAKE: normal.h
+// NMAKE-NOT: "
+
+#include "    .h"
+#include "$$.h"
+#include "##.h"
+#include "normal.h"
+
+// Backslash followed by # or space should escape both characters, because
+// that's what GNU Make wants.  GCC does the right thing with space, but not
+// #, so Clang does too. (There should be 3 backslashes before the #.)
+// SEP2F: a\b\\#c\\\ d.h
+// With -fms-compatibility, Backslashes in #include are treated as path separators.
+// Backslashes are given in the emission for special characters, like 0x20 or 0x23.
+// SEP5C: a{{[/\\]}}b{{[/\\]}}\#c{{/|\\\\}}\ d.h
+// These combinations are just another case for NMAKE.
+// NMAKE: "a{{[/\\]}}b{{[/\\]}}#c{{[/\\]}} d.h"
+
+#include "a\b\#c\ d.h"
diff --git a/src/third_party/llvm-project/clang/test/Frontend/dependency-gen-extradeps-phony.c b/src/third_party/llvm-project/clang/test/Frontend/dependency-gen-extradeps-phony.c
new file mode 100644
index 0000000..2d67a95
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/dependency-gen-extradeps-phony.c
@@ -0,0 +1,10 @@
+// RUN: %clang -MM -MP -Xclang -fdepfile-entry=1.extra -Xclang -fdepfile-entry=2.extra -Xclang -fdepfile-entry=2.extra %s | \
+// RUN: FileCheck %s --implicit-check-not=.c:
+//
+// Verify that phony targets are only created for the extra dependency files,
+// and not the input file.
+
+// CHECK: dependency-gen-extradeps-phony.o: 1.extra 2.extra \
+// CHECK-NEXT: dependency-gen-extradeps-phony.c
+// CHECK: 1.extra:
+// CHECK: 2.extra:
diff --git a/src/third_party/llvm-project/clang/test/Frontend/dependency-gen-symlink.c b/src/third_party/llvm-project/clang/test/Frontend/dependency-gen-symlink.c
new file mode 100644
index 0000000..2fa339a
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/dependency-gen-symlink.c
@@ -0,0 +1,24 @@
+// REQUIRES: shell
+
+// Basic test
+// RUN: rm -rf %t.dir
+// RUN: mkdir %t.dir
+// RUN: mkdir %t.dir/a
+// RUN: mkdir %t.dir/b
+// RUN: echo "#ifndef HEADER_A" > %t.dir/a/header.h
+// RUN: echo "#define HEADER_A" >> %t.dir/a/header.h
+// RUN: echo "#endif" >> %t.dir/a/header.h
+// RUN: ln -s %t.dir/a/header.h %t.dir/b/header.h
+
+// RUN: %clang_cc1 -dependency-file %t.dir/file.deps -MT %s.o %s -fsyntax-only -I %t.dir -isystem %S/Inputs/SystemHeaderPrefix
+// RUN: FileCheck -input-file=%t.dir/file.deps %s
+// CHECK: dependency-gen-symlink.c.o
+// CHECK: dependency-gen-symlink.c
+// CHECK: a/header.h
+// CHECK: b/header.h
+// CHECK-NOT: with-header-guard.h
+#include "a/header.h"
+#include "b/header.h"
+// System header shouldn't be included in dependencies.
+#include <with-header-guard.h>
+#include <with-header-guard.h>
diff --git a/src/third_party/llvm-project/clang/test/Frontend/dependency-gen.c b/src/third_party/llvm-project/clang/test/Frontend/dependency-gen.c
new file mode 100644
index 0000000..cd222c5
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/dependency-gen.c
@@ -0,0 +1,29 @@
+// Basic test
+// RUN: rm -rf %t.dir
+// RUN: mkdir -p %t.dir/a/b
+// RUN: echo > %t.dir/a/b/x.h
+// RUN: cd %t.dir
+// RUN: %clang -MD -MF - %s -fsyntax-only -I a/b | FileCheck -check-prefix=CHECK-ONE %s
+// CHECK-ONE: {{ }}a/b{{[/\\]}}x.h
+
+// PR8974 (-include flag)
+// RUN: %clang -MD -MF - %s -fsyntax-only -include a/b/x.h -DINCLUDE_FLAG_TEST | FileCheck -check-prefix=CHECK-TWO %s
+// CHECK-TWO: {{ }}a/b/x.h
+
+// rdar://problem/9734352 (paths involving ".")
+// RUN: %clang -MD -MF - %s -fsyntax-only -I ./a/b | FileCheck -check-prefix=CHECK-THREE %s
+// CHECK-THREE: {{ }}a/b{{[/\\]}}x.h
+// RUN: %clang -MD -MF - %s -fsyntax-only -I .//./a/b/ | FileCheck -check-prefix=CHECK-FOUR %s
+// CHECK-FOUR: {{ }}a/b{{[/\\]}}x.h
+// RUN: %clang -MD -MF - %s -fsyntax-only -I a/b/. | FileCheck -check-prefix=CHECK-FIVE %s
+// CHECK-FIVE: {{ }}a/b/.{{[/\\]}}x.h
+// RUN: cd a/b
+// RUN: %clang -MD -MF - %s -fsyntax-only -I ./ | FileCheck -check-prefix=CHECK-SIX %s
+// CHECK-SIX: {{ }}x.h
+// RUN: echo "fun:foo" > %t.blacklist
+// RUN: %clang -MD -MF - %s -fsyntax-only -resource-dir=%S/Inputs/resource_dir_with_cfi_blacklist -fsanitize=cfi-vcall -flto -fvisibility=hidden -fsanitize-blacklist=%t.blacklist -I ./ | FileCheck -check-prefix=CHECK-SEVEN %s
+// CHECK-SEVEN: .blacklist
+// CHECK-SEVEN: {{ }}x.h
+#ifndef INCLUDE_FLAG_TEST
+#include <x.h>
+#endif
diff --git a/src/third_party/llvm-project/clang/test/Frontend/dependency-generation-crash.c b/src/third_party/llvm-project/clang/test/Frontend/dependency-generation-crash.c
new file mode 100644
index 0000000..2fc3348
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/dependency-generation-crash.c
@@ -0,0 +1,5 @@
+// RUN: not %clang_cc1 -E -dependency-file bla -MT %t/doesnotexist/bla.o -MP -o %t/doesnotexist/bla.o -x c /dev/null 2>&1 | FileCheck %s
+
+// CHECK: error: unable to open output file
+
+// rdar://9286457
diff --git a/src/third_party/llvm-project/clang/test/Frontend/diagnostics-option-names.c b/src/third_party/llvm-project/clang/test/Frontend/diagnostics-option-names.c
new file mode 100644
index 0000000..ed0d2ed
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/diagnostics-option-names.c
@@ -0,0 +1,8 @@
+// RUN: not %clang_cc1 -fdiagnostics-show-option -Werror -Weverything %s 2> %t
+// RUN: FileCheck < %t %s
+
+int f0(int, unsigned);
+int f0(int x, unsigned y) {
+// CHECK: comparison of integers of different signs{{.*}} [-Werror,-Wsign-compare]
+  return x < y; // expected-error {{ : 'int' and 'unsigned int'  }}
+}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/diagnostics-order.c b/src/third_party/llvm-project/clang/test/Frontend/diagnostics-order.c
new file mode 100644
index 0000000..37c0cd9
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/diagnostics-order.c
@@ -0,0 +1,12 @@
+// Make sure a note stays with its associated command-line argument diagnostic.
+// Previously, these diagnostics were grouped by diagnostic level with all
+// notes last.
+//
+// RUN: not %clang_cc1 -O999 -std=bogus -verify=-foo %s 2> %t
+// RUN: FileCheck < %t %s
+//
+// CHECK:      error: invalid value '-foo' in '-verify='
+// CHECK-NEXT: note: -verify prefixes must start with a letter and contain only alphanumeric characters, hyphens, and underscores
+// CHECK-NEXT: warning: optimization level '-O999' is not supported
+// CHECK-NEXT: error: invalid value 'bogus' in '-std=bogus'
+// CHECK-NEXT: note: use {{.*}} for {{.*}} standard
diff --git a/src/third_party/llvm-project/clang/test/Frontend/disable-output.c b/src/third_party/llvm-project/clang/test/Frontend/disable-output.c
new file mode 100644
index 0000000..786ac77
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/disable-output.c
@@ -0,0 +1,7 @@
+// REQUIRES: x86-registered-target
+// RUN: %clang_cc1 %s -emit-llvm-only -triple=i386-apple-darwin -o %t
+// RUN: not rm %t
+// RUN: %clang_cc1 %s -emit-codegen-only -triple=i386-apple-darwin -o %t
+// RUN: not rm %t
+
+// Test that output is not generated when emission is disabled.
diff --git a/src/third_party/llvm-project/clang/test/Frontend/embed-bitcode.ll b/src/third_party/llvm-project/clang/test/Frontend/embed-bitcode.ll
new file mode 100644
index 0000000..bd2afb4
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/embed-bitcode.ll
@@ -0,0 +1,59 @@
+; REQUIRES: arm-registered-target
+; REQUIRES: aarch64-registered-target
+; check .ll input
+; RUN: %clang_cc1 -triple thumbv7-apple-ios8.0.0 -emit-llvm \
+; RUN:    -fembed-bitcode=all -x ir %s -o - \
+; RUN:    | FileCheck %s
+; RUN: %clang_cc1 -triple thumbv7-apple-ios8.0.0 -emit-llvm \
+; RUN:    -fembed-bitcode=marker -x ir %s -o - \
+; RUN:    | FileCheck %s -check-prefix=CHECK-MARKER
+; RUN: %clang_cc1 -triple aarch64-unknown-linux-gnueabi -emit-llvm \
+; RUN:    -fembed-bitcode=all -x ir %s -o - \
+; RUN:    | FileCheck %s -check-prefix=CHECK-ELF
+
+; check .bc input
+; RUN: %clang_cc1 -triple thumbv7-apple-ios8.0.0 -emit-llvm-bc \
+; RUN:    -x ir %s -o %t.bc
+; RUN: %clang_cc1 -triple thumbv7-apple-ios8.0.0 -emit-llvm \
+; RUN:    -fembed-bitcode=all -x ir %t.bc -o - \
+; RUN:    | FileCheck %s
+; RUN: %clang_cc1 -triple thumbv7-apple-ios8.0.0 -emit-llvm \
+; RUN:    -fembed-bitcode=bitcode -x ir %t.bc -o - \
+; RUN:    | FileCheck %s -check-prefix=CHECK-ONLY-BITCODE
+; RUN: %clang_cc1 -triple thumbv7-apple-ios8.0.0 -emit-llvm \
+; RUN:    -fembed-bitcode=marker -x ir %t.bc -o - \
+; RUN:    | FileCheck %s -check-prefix=CHECK-MARKER
+
+; run through -fembed-bitcode twice and make sure it doesn't crash
+; RUN: %clang_cc1 -triple thumbv7-apple-ios8.0.0 -emit-llvm-bc \
+; RUN:    -fembed-bitcode=all -x ir %s -o - \
+; RUN: | %clang_cc1 -triple thumbv7-apple-ios8.0.0 -emit-llvm \
+; RUN:    -fembed-bitcode=all -x ir - -o /dev/null
+
+; check the magic number of bitcode at the beginning of the string
+; CHECK: @llvm.embedded.module = private constant
+; CHECK: c"\DE\C0\17\0B
+; CHECK: section "__LLVM,__bitcode"
+; CHECK: @llvm.cmdline = private constant
+; CHECK: section "__LLVM,__cmdline"
+
+; CHECK-ELF: @llvm.embedded.module
+; CHECK-ELF: section ".llvmbc"
+; CHECK-ELF: @llvm.cmdline
+; CHECK-ELF: section ".llvmcmd"
+
+; CHECK-ONLY-BITCODE: @llvm.embedded.module = private constant
+; CHECK-ONLY-BITCODE: c"\DE\C0\17\0B
+; CHECK-ONLY-BITCODE: section "__LLVM,__bitcode"
+; CHECK-ONLY-BITCODE-NOT: @llvm.cmdline = private constant
+; CHECK-ONLY-BITCODE-NOT: section "__LLVM,__cmdline"
+
+; CHECK-MARKER: @llvm.embedded.module
+; CHECK-MARKER: constant [0 x i8] zeroinitializer
+; CHECK-MARKER: section "__LLVM,__bitcode"
+; CHECK-MARKER: @llvm.cmdline
+; CHECK-MARKER: section "__LLVM,__cmdline"
+
+define i32 @f0() {
+  ret i32 0
+}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/exceptions.c b/src/third_party/llvm-project/clang/test/Frontend/exceptions.c
new file mode 100644
index 0000000..981b5b9
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/exceptions.c
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -fms-compatibility -fexceptions -fcxx-exceptions -DMS_MODE -verify %s
+// expected-no-diagnostics
+
+// RUN: %clang_cc1 -fms-compatibility -fexceptions -verify %s
+// expected-no-diagnostics
+
+#if defined(MS_MODE) && defined(__EXCEPTIONS)
+#error __EXCEPTIONS should not be defined.
+#endif
diff --git a/src/third_party/llvm-project/clang/test/Frontend/fixed_point.c b/src/third_party/llvm-project/clang/test/Frontend/fixed_point.c
new file mode 100644
index 0000000..3a67718
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/fixed_point.c
@@ -0,0 +1,399 @@
+// RUN: %clang_cc1 -x c -ffixed-point -ast-dump %s | FileCheck %s --strict-whitespace
+
+/*  Various contexts where type _Accum can appear. */
+
+// Primary fixed point types
+signed short _Accum s_short_accum;
+signed _Accum s_accum;
+signed long _Accum s_long_accum;
+unsigned short _Accum u_short_accum;
+unsigned _Accum u_accum;
+unsigned long _Accum u_long_accum;
+signed short _Fract s_short_fract;
+signed _Fract s_fract;
+signed long _Fract s_long_fract;
+unsigned short _Fract u_short_fract;
+unsigned _Fract u_fract;
+unsigned long _Fract u_long_fract;
+
+// Aliased fixed point types
+short _Accum short_accum;
+_Accum accum;
+long _Accum long_accum;
+short _Fract short_fract;
+_Fract fract;
+long _Fract long_fract;
+
+// Saturated fixed point types
+_Sat signed short _Accum sat_s_short_accum;
+_Sat signed _Accum sat_s_accum;
+_Sat signed long _Accum sat_s_long_accum;
+_Sat unsigned short _Accum sat_u_short_accum;
+_Sat unsigned _Accum sat_u_accum;
+_Sat unsigned long _Accum sat_u_long_accum;
+_Sat signed short _Fract sat_s_short_fract;
+_Sat signed _Fract sat_s_fract;
+_Sat signed long _Fract sat_s_long_fract;
+_Sat unsigned short _Fract sat_u_short_fract;
+_Sat unsigned _Fract sat_u_fract;
+_Sat unsigned long _Fract sat_u_long_fract;
+
+// Aliased saturated fixed point types
+_Sat short _Accum sat_short_accum;
+_Sat _Accum sat_accum;
+_Sat long _Accum sat_long_accum;
+_Sat short _Fract sat_short_fract;
+_Sat _Fract sat_fract;
+_Sat long _Fract sat_long_fract;
+
+//CHECK:      |-VarDecl {{.*}} s_short_accum 'short _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} s_accum '_Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} s_long_accum 'long _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} u_short_accum 'unsigned short _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} u_accum 'unsigned _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} u_long_accum 'unsigned long _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} s_short_fract 'short _Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} s_fract '_Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} s_long_fract 'long _Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} u_short_fract 'unsigned short _Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} u_fract 'unsigned _Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} u_long_fract 'unsigned long _Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} short_accum 'short _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} accum '_Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} long_accum 'long _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} short_fract 'short _Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} fract '_Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} long_fract 'long _Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} sat_s_short_accum '_Sat short _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} sat_s_accum '_Sat _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} sat_s_long_accum '_Sat long _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} sat_u_short_accum '_Sat unsigned short _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} sat_u_accum '_Sat unsigned _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} sat_u_long_accum '_Sat unsigned long _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} sat_s_short_fract '_Sat short _Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} sat_s_fract '_Sat _Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} sat_s_long_fract '_Sat long _Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} sat_u_short_fract '_Sat unsigned short _Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} sat_u_fract '_Sat unsigned _Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} sat_u_long_fract '_Sat unsigned long _Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} sat_short_accum '_Sat short _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} sat_accum '_Sat _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} sat_long_accum '_Sat long _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} sat_short_fract '_Sat short _Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} sat_fract '_Sat _Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} sat_long_fract '_Sat long _Fract'
+
+#define MIX_TYPE_SPEC(SPEC, SIGN, SIZE, ID) \
+  SPEC SIGN SIZE _Accum ID; \
+  SIGN SPEC SIZE _Accum ID ## 2; \
+  SIGN SIZE SPEC _Accum ID ## 3; \
+  SIGN SIZE _Accum SPEC ID ## 4;
+
+/* Mixing fixed point types with other type specifiers */
+
+#define MIX_VOLATILE(SIGN, SIZE, ID) MIX_TYPE_SPEC(volatile, SIGN, SIZE, ID)
+#define MIX_ATOMIC(SIGN, SIZE, ID) MIX_TYPE_SPEC(_Atomic, SIGN, SIZE, ID)
+#define MIX_CONST(SIGN, SIZE, ID) MIX_TYPE_SPEC(const, SIGN, SIZE, ID)
+
+MIX_VOLATILE(signed, short, vol_s_short_accum)
+MIX_ATOMIC(signed, short, atm_s_short_accum)
+MIX_CONST(signed, short, const_s_short_accum)
+
+// CHECK-NEXT: |-VarDecl {{.*}} vol_s_short_accum 'volatile short _Accum'
+// CHECK-NEXT: |-VarDecl {{.*}} vol_s_short_accum2 'volatile short _Accum'
+// CHECK-NEXT: |-VarDecl {{.*}} vol_s_short_accum3 'volatile short _Accum'
+// CHECK-NEXT: |-VarDecl {{.*}} vol_s_short_accum4 'volatile short _Accum'
+
+// CHECK-NEXT: |-VarDecl {{.*}} atm_s_short_accum '_Atomic(short _Accum)'
+// CHECK-NEXT: |-VarDecl {{.*}} atm_s_short_accum2 '_Atomic(short _Accum)'
+// CHECK-NEXT: |-VarDecl {{.*}} atm_s_short_accum3 '_Atomic(short _Accum)'
+// CHECK-NEXT: |-VarDecl {{.*}} atm_s_short_accum4 '_Atomic(short _Accum)'
+
+// CHECK-NEXT: |-VarDecl {{.*}} const_s_short_accum 'const short _Accum'
+// CHECK-NEXT: |-VarDecl {{.*}} const_s_short_accum2 'const short _Accum'
+// CHECK-NEXT: |-VarDecl {{.*}} const_s_short_accum3 'const short _Accum'
+// CHECK-NEXT: |-VarDecl {{.*}} const_s_short_accum4 'const short _Accum'
+
+/* Typedefs */
+
+// Primary fixed point types
+typedef signed short   _Accum SsA_t;
+typedef signed         _Accum SA_t;
+typedef signed long    _Accum SlA_t;
+typedef unsigned short _Accum UsA_t;
+typedef unsigned       _Accum UA_t;
+typedef unsigned long  _Accum UlA_t;
+typedef signed short   _Fract SsF_t;
+typedef signed         _Fract SF_t;
+typedef signed long    _Fract SlF_t;
+typedef unsigned short _Fract UsF_t;
+typedef unsigned       _Fract UF_t;
+typedef unsigned long  _Fract UlF_t;
+
+// Aliased fixed point types
+typedef short _Accum sA_t;
+typedef       _Accum A_t;
+typedef long  _Accum lA_t;
+typedef short _Fract sF_t;
+typedef       _Fract F_t;
+typedef long  _Fract lF_t;
+
+// Saturated fixed point types
+typedef _Sat signed short   _Accum SatSsA_t;
+typedef _Sat signed         _Accum SatSA_t;
+typedef _Sat signed long    _Accum SatSlA_t;
+typedef _Sat unsigned short _Accum SatUsA_t;
+typedef _Sat unsigned       _Accum SatUA_t;
+typedef _Sat unsigned long  _Accum SatUlA_t;
+typedef _Sat signed short   _Fract SatSsF_t;
+typedef _Sat signed         _Fract SatSF_t;
+typedef _Sat signed long    _Fract SatSlF_t;
+typedef _Sat unsigned short _Fract SatUsF_t;
+typedef _Sat unsigned       _Fract SatUF_t;
+typedef _Sat unsigned long  _Fract SatUlF_t;
+
+// Aliased saturated fixed point types
+typedef _Sat short   _Accum SatsA_t;
+typedef _Sat         _Accum SatA_t;
+typedef _Sat long    _Accum SatlA_t;
+typedef _Sat short   _Fract SatsF_t;
+typedef _Sat         _Fract SatF_t;
+typedef _Sat long    _Fract SatlF_t;
+
+SsA_t     SsA_type;
+SA_t      SA_type;
+SlA_t     SlA_type;
+UsA_t     UsA_type;
+UA_t      UA_type;
+UlA_t     UlA_type;
+SsF_t     SsF_type;
+SF_t      SF_type;
+SlF_t     SlF_type;
+UsF_t     UsF_type;
+UF_t      UF_type;
+UlF_t     UlF_type;
+
+sA_t      sA_type;
+A_t       A_type;
+lA_t      lA_type;
+sF_t      sF_type;
+F_t       F_type;
+lF_t      lF_type;
+
+SatSsA_t  SatSsA_type;
+SatSA_t   SatSA_type;
+SatSlA_t  SatSlA_type;
+SatUsA_t  SatUsA_type;
+SatUA_t   SatUA_type;
+SatUlA_t  SatUlA_type;
+SatSsF_t  SatSsF_type;
+SatSF_t   SatSF_type;
+SatSlF_t  SatSlF_type;
+SatUsF_t  SatUsF_type;
+SatUF_t   SatUF_type;
+SatUlF_t  SatUlF_type;
+
+SatsA_t   SatsA_type;
+SatA_t    SatA_type;
+SatlA_t   SatlA_type;
+SatsF_t   SatsF_type;
+SatF_t    SatF_type;
+SatlF_t   SatlF_type;
+
+//CHECK:      |-VarDecl {{.*}} SsA_type 'SsA_t':'short _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} SA_type 'SA_t':'_Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} SlA_type 'SlA_t':'long _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} UsA_type 'UsA_t':'unsigned short _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} UA_type 'UA_t':'unsigned _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} UlA_type 'UlA_t':'unsigned long _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} SsF_type 'SsF_t':'short _Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} SF_type 'SF_t':'_Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} SlF_type 'SlF_t':'long _Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} UsF_type 'UsF_t':'unsigned short _Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} UF_type 'UF_t':'unsigned _Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} UlF_type 'UlF_t':'unsigned long _Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} sA_type 'sA_t':'short _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} A_type 'A_t':'_Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} lA_type 'lA_t':'long _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} sF_type 'sF_t':'short _Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} F_type 'F_t':'_Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} lF_type 'lF_t':'long _Fract'
+
+//CHECK-NEXT: |-VarDecl {{.*}} SatSsA_type 'SatSsA_t':'_Sat short _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} SatSA_type 'SatSA_t':'_Sat _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} SatSlA_type 'SatSlA_t':'_Sat long _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} SatUsA_type 'SatUsA_t':'_Sat unsigned short _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} SatUA_type 'SatUA_t':'_Sat unsigned _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} SatUlA_type 'SatUlA_t':'_Sat unsigned long _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} SatSsF_type 'SatSsF_t':'_Sat short _Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} SatSF_type 'SatSF_t':'_Sat _Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} SatSlF_type 'SatSlF_t':'_Sat long _Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} SatUsF_type 'SatUsF_t':'_Sat unsigned short _Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} SatUF_type 'SatUF_t':'_Sat unsigned _Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} SatUlF_type 'SatUlF_t':'_Sat unsigned long _Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} SatsA_type 'SatsA_t':'_Sat short _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} SatA_type 'SatA_t':'_Sat _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} SatlA_type 'SatlA_t':'_Sat long _Accum'
+//CHECK-NEXT: |-VarDecl {{.*}} SatsF_type 'SatsF_t':'_Sat short _Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} SatF_type 'SatF_t':'_Sat _Fract'
+//CHECK-NEXT: |-VarDecl {{.*}} SatlF_type 'SatlF_t':'_Sat long _Fract'
+
+// Fixed point literal exponent syntax
+_Accum decexp1 = 1.575e1k;
+_Accum decexp2 = 1.575E1k;
+_Accum decexp3 = 1575e-2k;
+_Accum decexp4 = 1575E-2k;
+
+_Accum hexexp1 = 0x0.3p10k;
+_Accum hexexp2 = 0x0.3P10k;
+_Accum hexexp3 = 0x30000p-10k;
+_Accum hexexp4 = 0x30000P-10k;
+
+_Accum zeroexp1 = 1e0k;
+_Accum zeroexp2 = 1e-0k;
+
+//CHECK-NEXT: |-VarDecl {{.*}} decexp1 '_Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} '_Accum' 15.75
+//CHECK-NEXT: |-VarDecl {{.*}} decexp2 '_Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} '_Accum' 15.75
+//CHECK-NEXT: |-VarDecl {{.*}} decexp3 '_Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} '_Accum' 15.75
+//CHECK-NEXT: |-VarDecl {{.*}} decexp4 '_Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} '_Accum' 15.75
+
+//CHECK-NEXT: |-VarDecl {{.*}} hexexp1 '_Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} '_Accum' 192.0
+//CHECK-NEXT: |-VarDecl {{.*}} hexexp2 '_Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} '_Accum' 192.0
+//CHECK-NEXT: |-VarDecl {{.*}} hexexp3 '_Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} '_Accum' 192.0
+//CHECK-NEXT: |-VarDecl {{.*}} hexexp4 '_Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} '_Accum' 192.0
+
+//CHECK-NEXT: |-VarDecl {{.*}} zeroexp1 '_Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} '_Accum' 1.0
+//CHECK-NEXT: |-VarDecl {{.*}} zeroexp2 '_Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} '_Accum' 1.0
+
+// Fixed point literal values
+_Accum literal1 = 2.5k;       // Precise decimal
+_Accum literal2 = 0.0k;       // Zero
+_Accum literal3 = 1.1k;       // Imprecise decimal
+_Accum literal4 = 1.11k;
+_Accum literal5 = 1.111k;
+_Accum literal6 = 1.1111k;
+_Accum literal7 = 1.11111k;   // After some point after the radix, adding any more
+                              // digits to the literal will not result in any
+                              // further precision since the nth digit added may
+                              // be less than the precision that can be
+                              // represented by the fractional bits of the type.
+                              // This results in the same value being stored for
+                              // the type.
+
+//CHECK-NEXT: |-VarDecl {{.*}} literal1 '_Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} '_Accum' 2.5
+//CHECK-NEXT: |-VarDecl {{.*}} literal2 '_Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} '_Accum' 0.0
+//CHECK-NEXT: |-VarDecl {{.*}} literal3 '_Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} '_Accum' 1.0999755859375
+//CHECK-NEXT: |-VarDecl {{.*}} literal4 '_Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} '_Accum' 1.1099853515625
+//CHECK-NEXT: |-VarDecl {{.*}} literal5 '_Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} '_Accum' 1.110992431640625
+//CHECK-NEXT: |-VarDecl {{.*}} literal6 '_Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} '_Accum' 1.111083984375
+//CHECK-NEXT: |-VarDecl {{.*}} literal7 '_Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} '_Accum' 1.111083984375
+
+long _Accum longaccumliteral     = 0.99999999lk;
+long _Accum longaccumliteral2    = 0.999999999lk;
+long _Accum verylongaccumliteral = 0.99999999999999999999999999lk;
+long _Fract longfractliteral     = 0.99999999lr;
+long _Fract longfractliteral2    = 0.999999999lr;
+long _Fract verylongfractliteral = 0.99999999999999999999999999lr;
+
+//CHECK-NEXT: |-VarDecl {{.*}} longaccumliteral 'long _Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} 'long _Accum' 0.999999989755451679229736328125
+//CHECK-NEXT: |-VarDecl {{.*}} longaccumliteral2 'long _Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} 'long _Accum' 0.9999999986030161380767822265625
+//CHECK-NEXT: |-VarDecl {{.*}} verylongaccumliteral 'long _Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} 'long _Accum' 0.9999999995343387126922607421875
+//CHECK-NEXT: |-VarDecl {{.*}} longfractliteral 'long _Fract' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} 'long _Fract' 0.999999989755451679229736328125
+//CHECK-NEXT: |-VarDecl {{.*}} longfractliteral2 'long _Fract' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} 'long _Fract' 0.9999999986030161380767822265625
+//CHECK-NEXT: |-VarDecl {{.*}} verylongfractliteral 'long _Fract' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} 'long _Fract' 0.9999999995343387126922607421875
+
+unsigned _Accum uliteral1 = 2.5uk;    // Unsigned
+_Accum literal8 = -2.5k;              // Negative
+
+//CHECK-NEXT: |-VarDecl {{.*}} uliteral1 'unsigned _Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} 'unsigned _Accum' 2.5
+//CHECK-NEXT: |-VarDecl {{.*}} literal8 '_Accum' cinit
+//CHECK-NEXT:   `-UnaryOperator {{.*}} '_Accum' prefix '-'
+//CHECK-NEXT:     `-FixedPointLiteral {{.*}} '_Accum' 2.5
+
+short _Accum  literalexact1 = 0.9921875hk;  // Exact value
+_Accum        literalexact2 = 0.999969482421875k;
+
+//CHECK-NEXT: |-VarDecl {{.*}} literalexact1 'short _Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} 'short _Accum' 0.9921875
+//CHECK-NEXT: |-VarDecl {{.*}} literalexact2 '_Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} '_Accum' 0.999969482421875
+
+// Unfortunately we do not have enough space to store the exact decimal value of
+// 0.9999999995343387126922607421875 ((1 << 31) - 1), but we can still use a
+// large number of 9s to get the max fractional value.
+long _Accum   long_accum_max = 0.999999999999999999999999999lk;
+
+//CHECK-NEXT: |-VarDecl {{.*}} long_accum_max 'long _Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} 'long _Accum' 0.9999999995343387126922607421875
+
+// Epsilon
+short _Accum  short_accum_eps   = 0.0078125hk;
+short _Accum  short_accum_eps2  = 0.0078124hk;  // Less than epsilon floors to zero
+_Accum        accum_eps         = 0.000030517578125k;
+_Accum        accum_eps2        = 0.000030517578124k;
+long _Accum   long_accum_eps    = 0x1p-31lk;
+long _Accum   long_accum_eps2   = 0x0.99999999p-31lk;
+
+//CHECK-NEXT: |-VarDecl {{.*}} short_accum_eps 'short _Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} 'short _Accum' 0.0078125
+//CHECK-NEXT: |-VarDecl {{.*}} short_accum_eps2 'short _Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} 'short _Accum' 0.0
+//CHECK-NEXT: |-VarDecl {{.*}} accum_eps '_Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} '_Accum' 0.000030517578125
+//CHECK-NEXT: |-VarDecl {{.*}} accum_eps2 '_Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} '_Accum' 0.0
+//CHECK-NEXT: |-VarDecl {{.*}} long_accum_eps 'long _Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} 'long _Accum' 0.0000000004656612873077392578125
+//CHECK-NEXT: |-VarDecl {{.*}} long_accum_eps2 'long _Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} 'long _Accum' 0.0
+
+// Fract literals can be one but evaluate to the respective Fract max
+short _Fract           short_fract_one   = 1.0hr;
+_Fract                 fract_one         = 1.0r;
+long _Fract            long_fract_one    = 1.0lr;
+unsigned short _Fract  u_short_fract_one = 1.0uhr;
+unsigned _Fract        u_fract_one       = 1.0ur;
+unsigned long _Fract   u_long_fract_one  = 1.0ulr;
+
+//CHECK-NEXT: |-VarDecl {{.*}} short_fract_one 'short _Fract' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} 'short _Fract' 0.9921875
+//CHECK-NEXT: |-VarDecl {{.*}} fract_one '_Fract' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} '_Fract' 0.999969482421875
+//CHECK-NEXT: |-VarDecl {{.*}} long_fract_one 'long _Fract' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} 'long _Fract' 0.9999999995343387126922607421875
+
+//CHECK-NEXT: |-VarDecl {{.*}} u_short_fract_one 'unsigned short _Fract' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} 'unsigned short _Fract' 0.99609375
+//CHECK-NEXT: |-VarDecl {{.*}} u_fract_one 'unsigned _Fract' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} 'unsigned _Fract' 0.9999847412109375
+//CHECK-NEXT: |-VarDecl {{.*}} u_long_fract_one 'unsigned long _Fract' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} 'unsigned long _Fract' 0.99999999976716935634613037109375
+
+_Accum literallast = 1.0k;    // One
+
+//CHECK-NEXT: `-VarDecl {{.*}} literallast '_Accum' cinit
+//CHECK-NEXT:   `-FixedPointLiteral {{.*}} '_Accum' 1.0
diff --git a/src/third_party/llvm-project/clang/test/Frontend/fixed_point_bit_widths.c b/src/third_party/llvm-project/clang/test/Frontend/fixed_point_bit_widths.c
new file mode 100644
index 0000000..ac8db49
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/fixed_point_bit_widths.c
@@ -0,0 +1,196 @@
+// RUN: %clang -x c -ffixed-point -S -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang -x c -ffixed-point -S -emit-llvm -o - --target=x86_64-scei-ps4-ubuntu-fast %s | FileCheck %s
+// RUN: %clang -x c -ffixed-point -S -emit-llvm -o - --target=ppc64 %s | FileCheck %s
+// RUN: %clang -x c -ffixed-point -S -emit-llvm -o - --target=x86_64-scei-ps4-windows10pro-fast %s | FileCheck %s
+
+/* Primary signed _Accum */
+
+int size_SsA = sizeof(signed short _Accum);
+int size_SA  = sizeof(signed _Accum);
+int size_SlA = sizeof(signed long _Accum);
+int align_SsA = __alignof(signed short _Accum);
+int align_SA  = __alignof(signed _Accum);
+int align_SlA = __alignof(signed long _Accum);
+
+// CHECK:      @size_SsA  = {{.*}}global i{{[0-9]+}} 2
+// CHECK-NEXT: @size_SA   = {{.*}}global i{{[0-9]+}} 4
+// CHECK-NEXT: @size_SlA  = {{.*}}global i{{[0-9]+}} 8
+// CHECK-NEXT: @align_SsA = {{.*}}global i{{[0-9]+}} 2
+// CHECK-NEXT: @align_SA  = {{.*}}global i{{[0-9]+}} 4
+// CHECK-NEXT: @align_SlA = {{.*}}global i{{[0-9]+}} 8
+
+/* Primary unsigned _Accum */
+
+int size_UsA = sizeof(unsigned short _Accum);
+int size_UA  = sizeof(unsigned _Accum);
+int size_UlA = sizeof(unsigned long _Accum);
+int align_UsA = __alignof(unsigned short _Accum);
+int align_UA  = __alignof(unsigned _Accum);
+int align_UlA = __alignof(unsigned long _Accum);
+
+// CHECK-NEXT: @size_UsA  = {{.*}}global i{{[0-9]+}} 2
+// CHECK-NEXT: @size_UA   = {{.*}}global i{{[0-9]+}} 4
+// CHECK-NEXT: @size_UlA  = {{.*}}global i{{[0-9]+}} 8
+// CHECK-NEXT: @align_UsA = {{.*}}global i{{[0-9]+}} 2
+// CHECK-NEXT: @align_UA  = {{.*}}global i{{[0-9]+}} 4
+// CHECK-NEXT: @align_UlA = {{.*}}global i{{[0-9]+}} 8
+
+/* Primary signed _Fract */
+
+int size_SsF = sizeof(signed short _Fract);
+int size_SF  = sizeof(signed _Fract);
+int size_SlF = sizeof(signed long _Fract);
+int align_SsF = __alignof(signed short _Fract);
+int align_SF  = __alignof(signed _Fract);
+int align_SlF = __alignof(signed long _Fract);
+
+// CHECK-NEXT: @size_SsF  = {{.*}}global i{{[0-9]+}} 1
+// CHECK-NEXT: @size_SF   = {{.*}}global i{{[0-9]+}} 2
+// CHECK-NEXT: @size_SlF  = {{.*}}global i{{[0-9]+}} 4
+// CHECK-NEXT: @align_SsF = {{.*}}global i{{[0-9]+}} 1
+// CHECK-NEXT: @align_SF  = {{.*}}global i{{[0-9]+}} 2
+// CHECK-NEXT: @align_SlF = {{.*}}global i{{[0-9]+}} 4
+
+/* Primary unsigned _Fract */
+
+int size_UsF = sizeof(unsigned short _Fract);
+int size_UF  = sizeof(unsigned _Fract);
+int size_UlF = sizeof(unsigned long _Fract);
+int align_UsF = __alignof(unsigned short _Fract);
+int align_UF  = __alignof(unsigned _Fract);
+int align_UlF = __alignof(unsigned long _Fract);
+
+// CHECK-NEXT: @size_UsF  = {{.*}}global i{{[0-9]+}} 1
+// CHECK-NEXT: @size_UF   = {{.*}}global i{{[0-9]+}} 2
+// CHECK-NEXT: @size_UlF  = {{.*}}global i{{[0-9]+}} 4
+// CHECK-NEXT: @align_UsF = {{.*}}global i{{[0-9]+}} 1
+// CHECK-NEXT: @align_UF  = {{.*}}global i{{[0-9]+}} 2
+// CHECK-NEXT: @align_UlF = {{.*}}global i{{[0-9]+}} 4
+
+/* Aliased _Accum */
+
+int size_sA = sizeof(short _Accum);
+int size_A  = sizeof(_Accum);
+int size_lA = sizeof(long _Accum);
+int align_sA = __alignof(short _Accum);
+int align_A  = __alignof(_Accum);
+int align_lA = __alignof(long _Accum);
+
+// CHECK-NEXT: @size_sA   = {{.*}}global i{{[0-9]+}} 2
+// CHECK-NEXT: @size_A    = {{.*}}global i{{[0-9]+}} 4
+// CHECK-NEXT: @size_lA   = {{.*}}global i{{[0-9]+}} 8
+// CHECK-NEXT: @align_sA  = {{.*}}global i{{[0-9]+}} 2
+// CHECK-NEXT: @align_A   = {{.*}}global i{{[0-9]+}} 4
+// CHECK-NEXT: @align_lA  = {{.*}}global i{{[0-9]+}} 8
+
+/* Aliased _Fract */
+
+int size_sF = sizeof(short _Fract);
+int size_F  = sizeof(_Fract);
+int size_lF = sizeof(long _Fract);
+int align_sF = __alignof(short _Fract);
+int align_F  = __alignof(_Fract);
+int align_lF = __alignof(long _Fract);
+
+// CHECK-NEXT: @size_sF   = {{.*}}global i{{[0-9]+}} 1
+// CHECK-NEXT: @size_F    = {{.*}}global i{{[0-9]+}} 2
+// CHECK-NEXT: @size_lF   = {{.*}}global i{{[0-9]+}} 4
+// CHECK-NEXT: @align_sF  = {{.*}}global i{{[0-9]+}} 1
+// CHECK-NEXT: @align_F   = {{.*}}global i{{[0-9]+}} 2
+// CHECK-NEXT: @align_lF  = {{.*}}global i{{[0-9]+}} 4
+
+/* Saturated signed _Accum */
+
+int size_SatSsA = sizeof(_Sat signed short _Accum);
+int size_SatSA  = sizeof(_Sat signed _Accum);
+int size_SatSlA = sizeof(_Sat signed long _Accum);
+int align_SatSsA = __alignof(_Sat signed short _Accum);
+int align_SatSA  = __alignof(_Sat signed _Accum);
+int align_SatSlA = __alignof(_Sat signed long _Accum);
+
+// CHECK:      @size_SatSsA  = {{.*}}global i{{[0-9]+}} 2
+// CHECK-NEXT: @size_SatSA   = {{.*}}global i{{[0-9]+}} 4
+// CHECK-NEXT: @size_SatSlA  = {{.*}}global i{{[0-9]+}} 8
+// CHECK-NEXT: @align_SatSsA = {{.*}}global i{{[0-9]+}} 2
+// CHECK-NEXT: @align_SatSA  = {{.*}}global i{{[0-9]+}} 4
+// CHECK-NEXT: @align_SatSlA = {{.*}}global i{{[0-9]+}} 8
+
+/* Saturated unsigned _Accum */
+
+int size_SatUsA = sizeof(_Sat unsigned short _Accum);
+int size_SatUA  = sizeof(_Sat unsigned _Accum);
+int size_SatUlA = sizeof(_Sat unsigned long _Accum);
+int align_SatUsA = __alignof(_Sat unsigned short _Accum);
+int align_SatUA  = __alignof(_Sat unsigned _Accum);
+int align_SatUlA = __alignof(_Sat unsigned long _Accum);
+
+// CHECK-NEXT: @size_SatUsA  = {{.*}}global i{{[0-9]+}} 2
+// CHECK-NEXT: @size_SatUA   = {{.*}}global i{{[0-9]+}} 4
+// CHECK-NEXT: @size_SatUlA  = {{.*}}global i{{[0-9]+}} 8
+// CHECK-NEXT: @align_SatUsA = {{.*}}global i{{[0-9]+}} 2
+// CHECK-NEXT: @align_SatUA  = {{.*}}global i{{[0-9]+}} 4
+// CHECK-NEXT: @align_SatUlA = {{.*}}global i{{[0-9]+}} 8
+
+/* Saturated signed _Fract */
+
+int size_SatSsF = sizeof(_Sat signed short _Fract);
+int size_SatSF  = sizeof(_Sat signed _Fract);
+int size_SatSlF = sizeof(_Sat signed long _Fract);
+int align_SatSsF = __alignof(_Sat signed short _Fract);
+int align_SatSF  = __alignof(_Sat signed _Fract);
+int align_SatSlF = __alignof(_Sat signed long _Fract);
+
+// CHECK-NEXT: @size_SatSsF  = {{.*}}global i{{[0-9]+}} 1
+// CHECK-NEXT: @size_SatSF   = {{.*}}global i{{[0-9]+}} 2
+// CHECK-NEXT: @size_SatSlF  = {{.*}}global i{{[0-9]+}} 4
+// CHECK-NEXT: @align_SatSsF = {{.*}}global i{{[0-9]+}} 1
+// CHECK-NEXT: @align_SatSF  = {{.*}}global i{{[0-9]+}} 2
+// CHECK-NEXT: @align_SatSlF = {{.*}}global i{{[0-9]+}} 4
+
+/* Saturated unsigned _Fract */
+
+int size_SatUsF = sizeof(_Sat unsigned short _Fract);
+int size_SatUF  = sizeof(_Sat unsigned _Fract);
+int size_SatUlF = sizeof(_Sat unsigned long _Fract);
+int align_SatUsF = __alignof(_Sat unsigned short _Fract);
+int align_SatUF  = __alignof(_Sat unsigned _Fract);
+int align_SatUlF = __alignof(_Sat unsigned long _Fract);
+
+// CHECK-NEXT: @size_SatUsF  = {{.*}}global i{{[0-9]+}} 1
+// CHECK-NEXT: @size_SatUF   = {{.*}}global i{{[0-9]+}} 2
+// CHECK-NEXT: @size_SatUlF  = {{.*}}global i{{[0-9]+}} 4
+// CHECK-NEXT: @align_SatUsF = {{.*}}global i{{[0-9]+}} 1
+// CHECK-NEXT: @align_SatUF  = {{.*}}global i{{[0-9]+}} 2
+// CHECK-NEXT: @align_SatUlF = {{.*}}global i{{[0-9]+}} 4
+
+/* Aliased saturated signed _Accum */
+
+int size_SatsA = sizeof(_Sat short _Accum);
+int size_SatA  = sizeof(_Sat _Accum);
+int size_SatlA = sizeof(_Sat long _Accum);
+int align_SatsA = __alignof(_Sat short _Accum);
+int align_SatA  = __alignof(_Sat _Accum);
+int align_SatlA = __alignof(_Sat long _Accum);
+
+// CHECK-NEXT: @size_SatsA   = {{.*}}global i{{[0-9]+}} 2
+// CHECK-NEXT: @size_SatA    = {{.*}}global i{{[0-9]+}} 4
+// CHECK-NEXT: @size_SatlA   = {{.*}}global i{{[0-9]+}} 8
+// CHECK-NEXT: @align_SatsA  = {{.*}}global i{{[0-9]+}} 2
+// CHECK-NEXT: @align_SatA   = {{.*}}global i{{[0-9]+}} 4
+// CHECK-NEXT: @align_SatlA  = {{.*}}global i{{[0-9]+}} 8
+
+/* Aliased saturated _Fract */
+
+int size_SatsF = sizeof(_Sat short _Fract);
+int size_SatF  = sizeof(_Sat _Fract);
+int size_SatlF = sizeof(_Sat long _Fract);
+int align_SatsF = __alignof(_Sat short _Fract);
+int align_SatF  = __alignof(_Sat _Fract);
+int align_SatlF = __alignof(_Sat long _Fract);
+
+// CHECK-NEXT: @size_SatsF   = {{.*}}global i{{[0-9]+}} 1
+// CHECK-NEXT: @size_SatF    = {{.*}}global i{{[0-9]+}} 2
+// CHECK-NEXT: @size_SatlF   = {{.*}}global i{{[0-9]+}} 4
+// CHECK-NEXT: @align_SatsF  = {{.*}}global i{{[0-9]+}} 1
+// CHECK-NEXT: @align_SatF   = {{.*}}global i{{[0-9]+}} 2
+// CHECK-NEXT: @align_SatlF  = {{.*}}global i{{[0-9]+}} 4
diff --git a/src/third_party/llvm-project/clang/test/Frontend/fixed_point_declarations.c b/src/third_party/llvm-project/clang/test/Frontend/fixed_point_declarations.c
new file mode 100644
index 0000000..5df54f3
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/fixed_point_declarations.c
@@ -0,0 +1,113 @@
+// RUN: %clang -ffixed-point -S -emit-llvm %s -o - --target=x86_64-linux | FileCheck %s
+// RUN: %clang -ffixed-point -S -emit-llvm %s -o - --target=x86_64-scei-ps4-ubuntu-fast | FileCheck %s
+
+// Primary fixed point types
+signed short _Accum   s_short_accum;  // CHECK-DAG: @s_short_accum  = {{.*}}global i16 0, align 2
+signed _Accum         s_accum;        // CHECK-DAG: @s_accum        = {{.*}}global i32 0, align 4
+signed long _Accum    s_long_accum;   // CHECK-DAG: @s_long_accum   = {{.*}}global i64 0, align 8
+unsigned short _Accum u_short_accum;  // CHECK-DAG: @u_short_accum  = {{.*}}global i16 0, align 2
+unsigned _Accum       u_accum;        // CHECK-DAG: @u_accum        = {{.*}}global i32 0, align 4
+unsigned long _Accum  u_long_accum;   // CHECK-DAG: @u_long_accum   = {{.*}}global i64 0, align 8
+signed short _Fract   s_short_fract;  // CHECK-DAG: @s_short_fract  = {{.*}}global i8  0, align 1
+signed _Fract         s_fract;        // CHECK-DAG: @s_fract        = {{.*}}global i16 0, align 2
+signed long _Fract    s_long_fract;   // CHECK-DAG: @s_long_fract   = {{.*}}global i32 0, align 4
+unsigned short _Fract u_short_fract;  // CHECK-DAG: @u_short_fract  = {{.*}}global i8  0, align 1
+unsigned _Fract       u_fract;        // CHECK-DAG: @u_fract        = {{.*}}global i16 0, align 2
+unsigned long _Fract  u_long_fract;   // CHECK-DAG: @u_long_fract   = {{.*}}global i32 0, align 4
+
+// Aliased
+short _Accum  short_accum;            // CHECK-DAG: @short_accum    = {{.*}}global i16 0, align 2
+_Accum        accum;                  // CHECK-DAG: @accum          = {{.*}}global i32 0, align 4
+long _Accum   long_accum;             // CHECK-DAG: @long_accum     = {{.*}}global i64 0, align 8
+short _Fract  short_fract;            // CHECK-DAG: @short_fract    = {{.*}}global i8  0, align 1
+_Fract        fract;                  // CHECK-DAG: @fract          = {{.*}}global i16 0, align 2
+long _Fract   long_fract;             // CHECK-DAG: @long_fract     = {{.*}}global i32 0, align 4
+
+// Primary saturated
+_Sat signed short _Accum   sat_s_short_accum;  // CHECK-DAG: @sat_s_short_accum  = {{.*}}global i16 0, align 2
+_Sat signed _Accum         sat_s_accum;        // CHECK-DAG: @sat_s_accum        = {{.*}}global i32 0, align 4
+_Sat signed long _Accum    sat_s_long_accum;   // CHECK-DAG: @sat_s_long_accum   = {{.*}}global i64 0, align 8
+_Sat unsigned short _Accum sat_u_short_accum;  // CHECK-DAG: @sat_u_short_accum  = {{.*}}global i16 0, align 2
+_Sat unsigned _Accum       sat_u_accum;        // CHECK-DAG: @sat_u_accum        = {{.*}}global i32 0, align 4
+_Sat unsigned long _Accum  sat_u_long_accum;   // CHECK-DAG: @sat_u_long_accum   = {{.*}}global i64 0, align 8
+_Sat signed short _Fract   sat_s_short_fract;  // CHECK-DAG: @sat_s_short_fract  = {{.*}}global i8  0, align 1
+_Sat signed _Fract         sat_s_fract;        // CHECK-DAG: @sat_s_fract        = {{.*}}global i16 0, align 2
+_Sat signed long _Fract    sat_s_long_fract;   // CHECK-DAG: @sat_s_long_fract   = {{.*}}global i32 0, align 4
+_Sat unsigned short _Fract sat_u_short_fract;  // CHECK-DAG: @sat_u_short_fract  = {{.*}}global i8  0, align 1
+_Sat unsigned _Fract       sat_u_fract;        // CHECK-DAG: @sat_u_fract        = {{.*}}global i16 0, align 2
+_Sat unsigned long _Fract  sat_u_long_fract;   // CHECK-DAG: @sat_u_long_fract   = {{.*}}global i32 0, align 4
+
+// Aliased saturated
+_Sat short _Accum  sat_short_accum;            // CHECK-DAG: @sat_short_accum    = {{.*}}global i16 0, align 2
+_Sat _Accum        sat_accum;                  // CHECK-DAG: @sat_accum          = {{.*}}global i32 0, align 4
+_Sat long _Accum   sat_long_accum;             // CHECK-DAG: @sat_long_accum     = {{.*}}global i64 0, align 8
+_Sat short _Fract  sat_short_fract;            // CHECK-DAG: @sat_short_fract    = {{.*}}global i8  0, align 1
+_Sat _Fract        sat_fract;                  // CHECK-DAG: @sat_fract          = {{.*}}global i16 0, align 2
+_Sat long _Fract   sat_long_fract;             // CHECK-DAG: @sat_long_fract     = {{.*}}global i32 0, align 4
+
+/* Fixed point literals */
+short _Accum  short_accum_literal = 2.5hk;    // CHECK-DAG: @short_accum_literal  = {{.*}}global i16 320, align 2
+_Accum        accum_literal       = 2.5k;     // CHECK-DAG: @accum_literal        = {{.*}}global i32 81920, align 4
+long _Accum   long_accum_literal  = 2.5lk;    // CHECK-DAG: @long_accum_literal   = {{.*}}global i64 5368709120, align 8
+short _Fract  short_fract_literal = 0.5hr;    // CHECK-DAG: @short_fract_literal  = {{.*}}global i8  64, align 1
+_Fract        fract_literal       = 0.5r;     // CHECK-DAG: @fract_literal        = {{.*}}global i16 16384, align 2
+long _Fract   long_fract_literal  = 0.5lr;    // CHECK-DAG: @long_fract_literal   = {{.*}}global i32 1073741824, align 4
+
+unsigned short _Accum  u_short_accum_literal = 2.5uhk;    // CHECK-DAG: @u_short_accum_literal  = {{.*}}global i16 640, align 2
+unsigned _Accum        u_accum_literal       = 2.5uk;     // CHECK-DAG: @u_accum_literal        = {{.*}}global i32 163840, align 4
+unsigned long _Accum   u_long_accum_literal  = 2.5ulk;    // CHECK-DAG: @u_long_accum_literal   = {{.*}}global i64 10737418240, align 8
+unsigned short _Fract  u_short_fract_literal = 0.5uhr;    // CHECK-DAG: @u_short_fract_literal  = {{.*}}global i8  -128, align 1
+unsigned _Fract        u_fract_literal       = 0.5ur;     // CHECK-DAG: @u_fract_literal        = {{.*}}global i16 -32768, align 2
+unsigned long _Fract   u_long_fract_literal  = 0.5ulr;    // CHECK-DAG: @u_long_fract_literal   = {{.*}}global i32 -2147483648, align 4
+
+// Max literal values
+short _Accum          short_accum_max   = 255.9999999999999999hk;         // CHECK-DAG: @short_accum_max   = {{.*}}global i16 32767, align 2
+_Accum                accum_max         = 65535.9999999999999999k;        // CHECK-DAG: @accum_max         = {{.*}}global i32 2147483647, align 4
+long _Accum           long_accum_max    = 4294967295.9999999999999999lk;  // CHECK-DAG: @long_accum_max    = {{.*}}global i64 9223372036854775807, align 8
+unsigned short _Accum u_short_accum_max = 255.9999999999999999uhk;        // CHECK-DAG: @u_short_accum_max = {{.*}}global i16 -1, align 2
+unsigned _Accum       u_accum_max       = 65535.9999999999999999uk;       // CHECK-DAG: @u_accum_max       = {{.*}}global i32 -1, align 4
+unsigned long _Accum  u_long_accum_max  = 4294967295.9999999999999999ulk; // CHECK-DAG: @u_long_accum_max  = {{.*}}global i64 -1, align 8
+
+short _Fract          short_fract_max   = 0.9999999999999999hr;           // CHECK-DAG: @short_fract_max   = {{.*}}global i8  127, align 1
+_Fract                fract_max         = 0.9999999999999999r;            // CHECK-DAG: @fract_max         = {{.*}}global i16 32767, align 2
+long _Fract           long_fract_max    = 0.9999999999999999lr;           // CHECK-DAG: @long_fract_max    = {{.*}}global i32 2147483647, align 4
+unsigned short _Fract u_short_fract_max = 0.9999999999999999uhr;          // CHECK-DAG: @u_short_fract_max = {{.*}}global i8  -1, align 1
+unsigned _Fract       u_fract_max       = 0.9999999999999999ur;           // CHECK-DAG: @u_fract_max       = {{.*}}global i16 -1, align 2
+unsigned long _Fract  u_long_fract_max  = 0.9999999999999999ulr;          // CHECK-DAG: @u_long_fract_max  = {{.*}}global i32 -1, align 4
+
+// Fracts may be exactly one but evaluate to the Fract max
+short _Fract          short_fract_one   = 1.0hr;    // CHECK-DAG: @short_fract_one    = {{.*}}global i8  127, align 1
+_Fract                fract_one         = 1.0r;     // CHECK-DAG: @fract_one          = {{.*}}global i16 32767, align 2
+long _Fract           long_fract_one    = 1.0lr;    // CHECK-DAG: @long_fract_one     = {{.*}}global i32 2147483647, align 4
+unsigned short _Fract u_short_fract_one = 1.0uhr;   // CHECK-DAG: @u_short_fract_one  = {{.*}}global i8  -1, align 1
+unsigned _Fract       u_fract_one       = 1.0ur;    // CHECK-DAG: @u_fract_one        = {{.*}}global i16 -1, align 2
+unsigned long _Fract  u_long_fract_one  = 1.0ulr;   // CHECK-DAG: @u_long_fract_one   = {{.*}}global i32 -1, align 4
+
+short _Fract          short_fract_exp_one   = 0.1e1hr;    // CHECK-DAG: @short_fract_exp_one    = {{.*}}global i8  127, align 1
+_Fract                fract_exp_one         = 0.1e1r;     // CHECK-DAG: @fract_exp_one          = {{.*}}global i16 32767, align 2
+long _Fract           long_fract_exp_one    = 0.1e1lr;    // CHECK-DAG: @long_fract_exp_one     = {{.*}}global i32 2147483647, align 4
+unsigned short _Fract u_short_fract_exp_one = 0.1e1uhr;   // CHECK-DAG: @u_short_fract_exp_one  = {{.*}}global i8  -1, align 1
+unsigned _Fract       u_fract_exp_one       = 0.1e1ur;    // CHECK-DAG: @u_fract_exp_one        = {{.*}}global i16 -1, align 2
+unsigned long _Fract  u_long_fract_exp_one  = 0.1e1ulr;   // CHECK-DAG: @u_long_fract_exp_one   = {{.*}}global i32 -1, align 4
+
+short _Fract          short_fract_hex_exp_one   = 0x0.8p1hr;    // CHECK-DAG: @short_fract_hex_exp_one    = {{.*}}global i8  127, align 1
+_Fract                fract_hex_exp_one         = 0x0.8p1r;     // CHECK-DAG: @fract_hex_exp_one          = {{.*}}global i16 32767, align 2
+long _Fract           long_fract_hex_exp_one    = 0x0.8p1lr;    // CHECK-DAG: @long_fract_hex_exp_one     = {{.*}}global i32 2147483647, align 4
+unsigned short _Fract u_short_fract_hex_exp_one = 0x0.8p1uhr;   // CHECK-DAG: @u_short_fract_hex_exp_one  = {{.*}}global i8  -1, align 1
+unsigned _Fract       u_fract_hex_exp_one       = 0x0.8p1ur;    // CHECK-DAG: @u_fract_hex_exp_one        = {{.*}}global i16 -1, align 2
+unsigned long _Fract  u_long_fract_hex_exp_one  = 0x0.8p1ulr;   // CHECK-DAG: @u_long_fract_hex_exp_one   = {{.*}}global i32 -1, align 4
+
+// Expsilon values
+short _Accum          short_accum_eps   = 0x1p-7hk;         // CHECK-DAG: @short_accum_eps   = {{.*}}global i16 1, align 2
+_Accum                accum_eps         = 0x1p-15k;         // CHECK-DAG: @accum_eps         = {{.*}}global i32 1, align 4
+long _Accum           long_accum_eps    = 0x1p-31lk;        // CHECK-DAG: @long_accum_eps    = {{.*}}global i64 1, align 8
+unsigned short _Accum u_short_accum_eps = 0x1p-8uhk;        // CHECK-DAG: @u_short_accum_eps = {{.*}}global i16 1, align 2
+unsigned _Accum       u_accum_eps       = 0x1p-16uk;        // CHECK-DAG: @u_accum_eps       = {{.*}}global i32 1, align 4
+unsigned long _Accum  u_long_accum_eps  = 0x1p-32ulk;       // CHECK-DAG: @u_long_accum_eps  = {{.*}}global i64 1, align 8
+
+short _Fract          short_fract_eps   = 0x1p-7hr;         // CHECK-DAG: @short_fract_eps   = {{.*}}global i8  1, align 1
+_Fract                fract_eps         = 0x1p-15r;         // CHECK-DAG: @fract_eps         = {{.*}}global i16 1, align 2
+long _Fract           long_fract_eps    = 0x1p-31lr;        // CHECK-DAG: @long_fract_eps    = {{.*}}global i32 1, align 4
+unsigned short _Fract u_short_fract_eps = 0x1p-8uhr;        // CHECK-DAG: @u_short_fract_eps = {{.*}}global i8  1, align 1
+unsigned _Fract       u_fract_eps       = 0x1p-16ur;        // CHECK-DAG: @u_fract_eps       = {{.*}}global i16 1, align 2
+unsigned long _Fract  u_long_fract_eps  = 0x1p-32ulr;       // CHECK-DAG: @u_long_fract_eps  = {{.*}}global i32 1, align 4
diff --git a/src/third_party/llvm-project/clang/test/Frontend/fixed_point_errors.c b/src/third_party/llvm-project/clang/test/Frontend/fixed_point_errors.c
new file mode 100644
index 0000000..41427e3
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/fixed_point_errors.c
@@ -0,0 +1,234 @@
+// RUN: %clang_cc1 -verify -ffixed-point %s
+
+/* We do not yet support long long. No recommended bit widths are given for this
+ * size. */
+
+long long _Accum longlong_accum;              // expected-error{{'long long _Accum' is invalid}}
+unsigned long long _Accum u_longlong_accum;   // expected-error{{'long long _Accum' is invalid}}
+long long _Fract longlong_fract;              // expected-error{{'long long _Fract' is invalid}}
+unsigned long long _Fract u_longlong_fract;   // expected-error{{'long long _Fract' is invalid}}
+
+_Sat long long _Accum sat_longlong_accum;             // expected-error{{'long long _Accum' is invalid}}
+_Sat unsigned long long _Accum sat_u_longlong_accum;  // expected-error{{'long long _Accum' is invalid}}
+_Sat long long _Fract sat_longlong_fract;             // expected-error{{'long long _Fract' is invalid}}
+_Sat unsigned long long _Fract sat_u_longlong_fract;  // expected-error{{'long long _Fract' is invalid}}
+
+
+/* Although _Complex types work with floating point numbers, the extension
+ * provides no info for complex fixed point types. */
+
+_Complex signed short _Accum cmplx_s_short_accum;   // expected-error{{'_Complex _Accum' is invalid}}
+_Complex signed _Accum cmplx_s_accum;               // expected-error{{'_Complex _Accum' is invalid}}
+_Complex signed long _Accum cmplx_s_long_accum;     // expected-error{{'_Complex _Accum' is invalid}}
+_Complex unsigned short _Accum cmplx_u_short_accum; // expected-error{{'_Complex _Accum' is invalid}}
+_Complex unsigned _Accum cmplx_u_accum;             // expected-error{{'_Complex _Accum' is invalid}}
+_Complex unsigned long _Accum cmplx_u_long_accum;   // expected-error{{'_Complex _Accum' is invalid}}
+_Complex short _Accum cmplx_s_short_accum;          // expected-error{{'_Complex _Accum' is invalid}}
+_Complex _Accum cmplx_s_accum;                      // expected-error{{'_Complex _Accum' is invalid}}
+_Complex long _Accum cmplx_s_long_accum;            // expected-error{{'_Complex _Accum' is invalid}}
+
+_Complex signed short _Fract cmplx_s_short_fract;   // expected-error{{'_Complex _Fract' is invalid}}
+_Complex signed _Fract cmplx_s_fract;               // expected-error{{'_Complex _Fract' is invalid}}
+_Complex signed long _Fract cmplx_s_long_fract;     // expected-error{{'_Complex _Fract' is invalid}}
+_Complex unsigned short _Fract cmplx_u_short_fract; // expected-error{{'_Complex _Fract' is invalid}}
+_Complex unsigned _Fract cmplx_u_fract;             // expected-error{{'_Complex _Fract' is invalid}}
+_Complex unsigned long _Fract cmplx_u_long_fract;   // expected-error{{'_Complex _Fract' is invalid}}
+_Complex short _Fract cmplx_s_short_fract;          // expected-error{{'_Complex _Fract' is invalid}}
+_Complex _Fract cmplx_s_fract;                      // expected-error{{'_Complex _Fract' is invalid}}
+_Complex long _Fract cmplx_s_long_fract;            // expected-error{{'_Complex _Fract' is invalid}}
+
+_Complex _Sat signed short _Accum cmplx_sat_s_short_accum;   // expected-error{{'_Complex _Accum' is invalid}}
+_Complex _Sat signed _Accum cmplx_sat_s_accum;               // expected-error{{'_Complex _Accum' is invalid}}
+_Complex _Sat signed long _Accum cmplx_sat_s_long_accum;     // expected-error{{'_Complex _Accum' is invalid}}
+_Complex _Sat unsigned short _Accum cmplx_sat_u_short_accum; // expected-error{{'_Complex _Accum' is invalid}}
+_Complex _Sat unsigned _Accum cmplx_sat_u_accum;             // expected-error{{'_Complex _Accum' is invalid}}
+_Complex _Sat unsigned long _Accum cmplx_sat_u_long_accum;   // expected-error{{'_Complex _Accum' is invalid}}
+_Complex _Sat short _Accum cmplx_sat_s_short_accum;          // expected-error{{'_Complex _Accum' is invalid}}
+_Complex _Sat _Accum cmplx_sat_s_accum;                      // expected-error{{'_Complex _Accum' is invalid}}
+_Complex _Sat long _Accum cmplx_sat_s_long_accum;            // expected-error{{'_Complex _Accum' is invalid}}
+
+_Complex signed short _Fract cmplx_sat_s_short_fract;   // expected-error{{'_Complex _Fract' is invalid}}
+_Complex signed _Fract cmplx_sat_s_fract;               // expected-error{{'_Complex _Fract' is invalid}}
+_Complex signed long _Fract cmplx_sat_s_long_fract;     // expected-error{{'_Complex _Fract' is invalid}}
+_Complex unsigned short _Fract cmplx_sat_u_short_fract; // expected-error{{'_Complex _Fract' is invalid}}
+_Complex unsigned _Fract cmplx_sat_u_fract;             // expected-error{{'_Complex _Fract' is invalid}}
+_Complex unsigned long _Fract cmplx_sat_u_long_fract;   // expected-error{{'_Complex _Fract' is invalid}}
+_Complex short _Fract cmplx_sat_s_short_fract;          // expected-error{{'_Complex _Fract' is invalid}}
+_Complex _Fract cmplx_sat_s_fract;                      // expected-error{{'_Complex _Fract' is invalid}}
+_Complex long _Fract cmplx_sat_s_long_fract;            // expected-error{{'_Complex _Fract' is invalid}}
+
+/* Bad combinations */
+float _Accum f_accum;     // expected-error{{cannot combine with previous 'float' declaration specifier}}
+double _Accum d_accum;    // expected-error{{cannot combine with previous 'double' declaration specifier}}
+_Bool _Accum b_accum;     // expected-error{{cannot combine with previous '_Bool' declaration specifier}}
+char _Accum c_accum;      // expected-error{{cannot combine with previous 'char' declaration specifier}}
+int _Accum i_accum;       // expected-error{{cannot combine with previous 'int' declaration specifier}}
+
+float _Fract f_fract;     // expected-error{{cannot combine with previous 'float' declaration specifier}}
+double _Fract d_fract;    // expected-error{{cannot combine with previous 'double' declaration specifier}}
+_Bool _Fract b_fract;     // expected-error{{cannot combine with previous '_Bool' declaration specifier}}
+char _Fract c_fract;      // expected-error{{cannot combine with previous 'char' declaration specifier}}
+int _Fract i_fract;       // expected-error{{cannot combine with previous 'int' declaration specifier}}
+
+/* Bad saturated combinations */
+_Sat float f;             // expected-error{{'_Sat' specifier is only valid on '_Fract' or '_Accum', not 'float'}}
+_Sat double d;            // expected-error{{'_Sat' specifier is only valid on '_Fract' or '_Accum', not 'double'}}
+_Sat _Bool b;             // expected-error{{'_Sat' specifier is only valid on '_Fract' or '_Accum', not '_Bool'}}
+_Sat char c;              // expected-error{{'_Sat' specifier is only valid on '_Fract' or '_Accum', not 'char'}}
+_Sat int i;               // expected-error{{'_Sat' specifier is only valid on '_Fract' or '_Accum', not 'int'}}
+_Sat _Sat _Fract fract;   // expected-warning{{duplicate '_Sat' declaration specifier}}
+
+
+/* Literals that cannot fit into types */
+signed short _Accum s_short_accum = 256.0hk;            // expected-error{{this value is too large for this fixed point type}}
+unsigned short _Accum u_short_accum = 256.0uhk;         // expected-error{{this value is too large for this fixed point type}}
+signed _Accum s_accum = 65536.0k;                       // expected-error{{this value is too large for this fixed point type}}
+unsigned _Accum u_accum = 65536.0uk;                    // expected-error{{this value is too large for this fixed point type}}
+signed long _Accum s_long_accum = 4294967296.0lk;       // expected-error{{this value is too large for this fixed point type}}
+unsigned long _Accum u_long_accum = 4294967296.0ulk;    // expected-error{{this value is too large for this fixed point type}}
+
+// Large values from decimal exponents
+short _Accum          short_accum_exp   = 2.56e2hk;           // expected-error{{this value is too large for this fixed point type}}
+_Accum                accum_exp         = 6.5536e4k;          // expected-error{{this value is too large for this fixed point type}}
+long _Accum           long_accum_exp    = 4.294967296e9lk;    // expected-error{{this value is too large for this fixed point type}}
+unsigned short _Accum u_short_accum_exp = 2.56e2uhk;          // expected-error{{this value is too large for this fixed point type}}
+unsigned _Accum       u_accum_exp       = 6.5536e4uk;         // expected-error{{this value is too large for this fixed point type}}
+unsigned long _Accum  u_long_accum_exp  = 4.294967296e9ulk;   // expected-error{{this value is too large for this fixed point type}}
+
+// Large value from hexidecimal exponents
+short _Accum          short_accum_hex_exp   = 0x1p8hk;        // expected-error{{this value is too large for this fixed point type}}
+_Accum                accum_hex_exp         = 0x1p16k;        // expected-error{{this value is too large for this fixed point type}}
+long _Accum           long_accum_hex_exp    = 0x1p32lk;       // expected-error{{this value is too large for this fixed point type}}
+unsigned short _Accum u_short_accum_hex_exp = 0x1p8uhk;       // expected-error{{this value is too large for this fixed point type}}
+unsigned _Accum       u_accum_hex_exp       = 0x1p16uk;       // expected-error{{this value is too large for this fixed point type}}
+unsigned long _Accum  u_long_accum_hex_exp  = 0x1p32ulk;      // expected-error{{this value is too large for this fixed point type}}
+
+// Very large exponent
+_Accum x = 1e1000000000000000000000000000000000k;   // expected-error{{this value is too large for this fixed point type}}
+
+/* Although _Fract's cannot equal 1, _Fract literals written as 1 are allowed
+ * and the underlying value represents the max value for that _Fract type. */
+short _Fract          short_fract_above_1    = 1.1hr;   // expected-error{{this value is too large for this fixed point type}}
+_Fract                fract_above_1          = 1.1r;    // expected-error{{this value is too large for this fixed point type}}
+long _Fract           long_fract_above_1     = 1.1lr;   // expected-error{{this value is too large for this fixed point type}}
+unsigned short _Fract u_short_fract_above_1  = 1.1uhr;  // expected-error{{this value is too large for this fixed point type}}
+unsigned _Fract       u_fract_above_1        = 1.1ur;   // expected-error{{this value is too large for this fixed point type}}
+unsigned long _Fract  u_long_fract_above_1   = 1.1ulr;  // expected-error{{this value is too large for this fixed point type}}
+
+short _Fract          short_fract_hex_exp   = 0x0.fp1hr;      // expected-error{{this value is too large for this fixed point type}}
+_Fract                fract_hex_exp         = 0x0.fp1r;       // expected-error{{this value is too large for this fixed point type}}
+long _Fract           long_fract_hex_exp    = 0x0.fp1lr;      // expected-error{{this value is too large for this fixed point type}}
+unsigned short _Fract u_short_fract_hex_exp = 0x0.fp1uhr;     // expected-error{{this value is too large for this fixed point type}}
+unsigned _Fract       u_fract_hex_exp       = 0x0.fp1ur;      // expected-error{{this value is too large for this fixed point type}}
+unsigned long _Fract  u_long_fract_hex_exp  = 0x0.fp1ulr;     // expected-error{{this value is too large for this fixed point type}}
+
+/* Do not allow typedef to be used with typedef'd types */
+typedef short _Fract shortfract_t;
+typedef short _Accum shortaccum_t;
+typedef _Fract fract_t;
+typedef _Accum accum_t;
+typedef long _Fract longfract_t;
+typedef long _Accum longaccum_t;
+_Sat shortfract_t td_sat_short_fract;       // expected-error{{'_Sat' specifier is only valid on '_Fract' or '_Accum', not 'type-name'}}
+_Sat shortaccum_t td_sat_short_accum;       // expected-error{{'_Sat' specifier is only valid on '_Fract' or '_Accum', not 'type-name'}}
+_Sat fract_t td_sat_fract;                  // expected-error{{'_Sat' specifier is only valid on '_Fract' or '_Accum', not 'type-name'}}
+_Sat accum_t td_sat_accum;                  // expected-error{{'_Sat' specifier is only valid on '_Fract' or '_Accum', not 'type-name'}}
+_Sat longfract_t td_sat_long_fract;         // expected-error{{'_Sat' specifier is only valid on '_Fract' or '_Accum', not 'type-name'}}
+_Sat longaccum_t td_sat_long_accum;         // expected-error{{'_Sat' specifier is only valid on '_Fract' or '_Accum', not 'type-name'}}
+
+/* Bad suffixes  */
+_Accum fk = 1.0fk;    // expected-error{{invalid suffix 'fk' on integer constant}}
+_Accum kk = 1.0kk;    // expected-error{{invalid suffix 'kk' on integer constant}}
+_Accum rk = 1.0rk;    // expected-error{{invalid suffix 'rk' on integer constant}}
+_Accum rk = 1.0rr;    // expected-error{{invalid suffix 'rr' on integer constant}}
+_Accum qk = 1.0qr;    // expected-error{{invalid suffix 'qr' on integer constant}}
+
+/* Using wrong exponent notation */
+_Accum dec_with_hex_exp1 = 0.1p10k;    // expected-error{{invalid suffix 'p10k' on integer constant}}
+_Accum dec_with_hex_exp2 = 0.1P10k;    // expected-error{{invalid suffix 'P10k' on integer constant}}
+_Accum hex_with_dex_exp1 = 0x0.1e10k;  // expected-error{{hexadecimal floating constant requires an exponent}}
+_Accum hex_with_dex_exp2 = 0x0.1E10k;  // expected-error{{hexadecimal floating constant requires an exponent}}
+
+void CheckSuffixOnIntegerLiterals() {
+  _Accum short_acc_int;
+  _Accum acc_int;
+  _Accum long_acc_int;
+
+  _Accum u_short_acc_int;
+  _Accum u_acc_int;
+  _Accum u_long_acc_int;
+
+  _Fract short_fract_int;
+  _Fract fract_int;
+  _Fract long_fract_int;
+
+  _Fract u_short_fract_int;
+  _Fract u_fract_int;
+  _Fract u_long_fract_int;
+
+  // Decimal integer literals (non-zero)
+  short_acc_int = 10hk; // expected-error{{invalid suffix 'hk' on integer constant}}
+  acc_int = 10k;        // expected-error{{invalid suffix 'k' on integer constant}}
+  long_acc_int = 10lk;  // expected-error{{invalid suffix 'lk' on integer constant}}
+
+  u_short_acc_int = 10uhk; // expected-error{{invalid suffix 'uhk' on integer constant}}
+  u_acc_int = 10uk;        // expected-error{{invalid suffix 'uk' on integer constant}}
+  u_long_acc_int = 10ulk;  // expected-error{{invalid suffix 'ulk' on integer constant}}
+
+  short_fract_int = 10hr; // expected-error{{invalid suffix 'hr' on integer constant}}
+  fract_int = 10r;        // expected-error{{invalid suffix 'r' on integer constant}}
+  long_fract_int = 10lr;  // expected-error{{invalid suffix 'lr' on integer constant}}
+
+  u_short_fract_int = 10uhr; // expected-error{{invalid suffix 'uhr' on integer constant}}
+  u_fract_int = 10ur;        // expected-error{{invalid suffix 'ur' on integer constant}}
+  u_long_fract_int = 10ulr;  // expected-error{{invalid suffix 'ulr' on integer constant}}
+
+  // Decimal integer literals (0)
+  short_acc_int = 0hk; // expected-error{{invalid suffix 'hk' on integer constant}}
+  acc_int = 0k;        // expected-error{{invalid suffix 'k' on integer constant}}
+  long_acc_int = 0lk;  // expected-error{{invalid suffix 'lk' on integer constant}}
+
+  // Decimal integer literals (large number)
+  acc_int = 999999999999999999k;   // expected-error{{invalid suffix 'k' on integer constant}}
+  fract_int = 999999999999999999r; // expected-error{{invalid suffix 'r' on integer constant}}
+
+  // Octal integer literals
+  short_acc_int = 010hk; // expected-error{{invalid suffix 'hk' on integer constant}}
+  acc_int = 010k;        // expected-error{{invalid suffix 'k' on integer constant}}
+  long_acc_int = 010lk;  // expected-error{{invalid suffix 'lk' on integer constant}}
+
+  u_short_acc_int = 010uhk; // expected-error{{invalid suffix 'uhk' on integer constant}}
+  u_acc_int = 010uk;        // expected-error{{invalid suffix 'uk' on integer constant}}
+  u_long_acc_int = 010ulk;  // expected-error{{invalid suffix 'ulk' on integer constant}}
+
+  short_fract_int = 010hr; // expected-error{{invalid suffix 'hr' on integer constant}}
+  fract_int = 010r;        // expected-error{{invalid suffix 'r' on integer constant}}
+  long_fract_int = 010lr;  // expected-error{{invalid suffix 'lr' on integer constant}}
+
+  u_short_fract_int = 010uhr; // expected-error{{invalid suffix 'uhr' on integer constant}}
+  u_fract_int = 010ur;        // expected-error{{invalid suffix 'ur' on integer constant}}
+  u_long_fract_int = 010ulr;  // expected-error{{invalid suffix 'ulr' on integer constant}}
+
+  // Hexadecimal integer literals
+  short_acc_int = 0x10hk; // expected-error{{invalid suffix 'hk' on integer constant}}
+  acc_int = 0x10k;        // expected-error{{invalid suffix 'k' on integer constant}}
+  long_acc_int = 0x10lk;  // expected-error{{invalid suffix 'lk' on integer constant}}
+
+  u_short_acc_int = 0x10uhk; // expected-error{{invalid suffix 'uhk' on integer constant}}
+  u_acc_int = 0x10uk;        // expected-error{{invalid suffix 'uk' on integer constant}}
+  u_long_acc_int = 0x10ulk;  // expected-error{{invalid suffix 'ulk' on integer constant}}
+
+  short_fract_int = 0x10hr; // expected-error{{invalid suffix 'hr' on integer constant}}
+  fract_int = 0x10r;        // expected-error{{invalid suffix 'r' on integer constant}}
+  long_fract_int = 0x10lr;  // expected-error{{invalid suffix 'lr' on integer constant}}
+
+  u_short_fract_int = 0x10uhr; // expected-error{{invalid suffix 'uhr' on integer constant}}
+  u_fract_int = 0x10ur;        // expected-error{{invalid suffix 'ur' on integer constant}}
+  u_long_fract_int = 0x10ulr;  // expected-error{{invalid suffix 'ulr' on integer constant}}
+
+  // Using auto
+  auto auto_fract = 0r;  // expected-error{{invalid suffix 'r' on integer constant}}
+                         // expected-warning@-1{{type specifier missing, defaults to 'int'}}
+  auto auto_accum = 0k;  // expected-error{{invalid suffix 'k' on integer constant}}
+                         // expected-warning@-1{{type specifier missing, defaults to 'int'}}
+}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/fixed_point_errors.cpp b/src/third_party/llvm-project/clang/test/Frontend/fixed_point_errors.cpp
new file mode 100644
index 0000000..cdd90ce
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/fixed_point_errors.cpp
@@ -0,0 +1,14 @@
+// RUN: %clang_cc1 -x c++ %s -verify
+// RUN: %clang_cc1 -x c++ -ffixed-point %s -verify
+
+// Name namgling is not provided for fixed point types in c++
+
+_Accum accum;                           // expected-error{{unknown type name '_Accum'}}
+_Fract fract;                           // expected-error{{unknown type name '_Fract'}}
+_Sat _Accum sat_accum;                  // expected-error{{unknown type name '_Sat'}}
+                                        // expected-error@-1{{expected ';' after top level declarator}}
+
+int accum_int = 10k;     // expected-error{{invalid suffix 'k' on integer constant}}
+int fract_int = 10r;     // expected-error{{invalid suffix 'r' on integer constant}}
+float accum_flt = 10.0k; // expected-error{{invalid suffix 'k' on floating constant}}
+float fract_flt = 10.0r; // expected-error{{invalid suffix 'r' on floating constant}}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/fixed_point_not_enabled.c b/src/third_party/llvm-project/clang/test/Frontend/fixed_point_not_enabled.c
new file mode 100644
index 0000000..e752221
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/fixed_point_not_enabled.c
@@ -0,0 +1,21 @@
+// RUN: %clang_cc1 -x c -verify %s
+
+// Primary fixed point types
+signed short _Accum s_short_accum;    // expected-error{{compile with '-ffixed-point' to enable fixed point types}}
+signed _Accum s_accum;                // expected-error{{compile with '-ffixed-point' to enable fixed point types}}
+signed long _Accum s_long_accum;      // expected-error{{compile with '-ffixed-point' to enable fixed point types}}
+unsigned short _Accum u_short_accum;  // expected-error{{compile with '-ffixed-point' to enable fixed point types}}
+unsigned _Accum u_accum;              // expected-error{{compile with '-ffixed-point' to enable fixed point types}}
+unsigned long _Accum u_long_accum;    // expected-error{{compile with '-ffixed-point' to enable fixed point types}}
+
+// Aliased fixed point types
+short _Accum short_accum;             // expected-error{{compile with '-ffixed-point' to enable fixed point types}}
+_Accum accum;                         // expected-error{{compile with '-ffixed-point' to enable fixed point types}}
+                                      // expected-warning@-1{{type specifier missing, defaults to 'int'}}
+long _Accum long_accum;               // expected-error{{compile with '-ffixed-point' to enable fixed point types}}
+
+// Cannot use fixed point suffixes
+int accum_int = 10k;     // expected-error{{invalid suffix 'k' on integer constant}}
+int fract_int = 10r;     // expected-error{{invalid suffix 'r' on integer constant}}
+float accum_flt = 10.0k; // expected-error{{invalid suffix 'k' on floating constant}}
+float fract_flt = 10.0r; // expected-error{{invalid suffix 'r' on floating constant}}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/fixed_point_same_fbits.c b/src/third_party/llvm-project/clang/test/Frontend/fixed_point_same_fbits.c
new file mode 100644
index 0000000..1d116b7
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/fixed_point_same_fbits.c
@@ -0,0 +1,28 @@
+// RUN: %clang -ffixed-point -S -emit-llvm -o - %s | FileCheck %s -check-prefix=DEFAULT
+// RUN: %clang_cc1 -ffixed-point -fpadding-on-unsigned-fixed-point -S -emit-llvm -o - %s | FileCheck %s -check-prefix=SAME
+
+/* The scale for unsigned fixed point types should be the same as that of signed
+ * fixed point types when -fsame-fbits is enabled. */
+
+void func() {
+  unsigned short _Accum u_short_accum = 0.5uhk;
+  unsigned _Accum u_accum = 0.5uk;
+  unsigned long _Accum u_long_accum = 0.5ulk;
+  unsigned short _Fract u_short_fract = 0.5uhr;
+  unsigned _Fract u_fract = 0.5ur;
+  unsigned long _Fract u_long_fract = 0.5ulr;
+
+// DEFAULT: store i16 128, i16* {{.*}}, align 2
+// DEFAULT: store i32 32768, i32* {{.*}}, align 4
+// DEFAULT: store i64 2147483648, i64* {{.*}}, align 8
+// DEFAULT: store i8  -128, i8* {{.*}}, align 1
+// DEFAULT: store i16 -32768, i16* {{.*}}, align 2
+// DEFAULT: store i32 -2147483648, i32* {{.*}}, align 4
+
+// SAME: store i16 64, i16* {{.*}}, align 2
+// SAME: store i32 16384, i32* {{.*}}, align 4
+// SAME: store i64 1073741824, i64* {{.*}}, align 8
+// SAME: store i8  64, i8* {{.*}}, align 1
+// SAME: store i16 16384, i16* {{.*}}, align 2
+// SAME: store i32 1073741824, i32* {{.*}}, align 4
+}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/float16.cpp b/src/third_party/llvm-project/clang/test/Frontend/float16.cpp
new file mode 100644
index 0000000..aa65270
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/float16.cpp
@@ -0,0 +1,326 @@
+// RUN: %clang_cc1 -std=c++11 -ast-dump %s | FileCheck %s --strict-whitespace

+// RUN: %clang_cc1 -std=c++11 -ast-dump -fnative-half-type %s | FileCheck %s --check-prefix=CHECK-NATIVE --strict-whitespace

+

+/*  Various contexts where type _Float16 can appear. */

+

+/*  Namespace */

+namespace {

+  _Float16 f1n;

+  _Float16 f2n = 33.f16;

+  _Float16 arr1n[10];

+  _Float16 arr2n[] = { 1.2, 3.0, 3.e4 };

+  const volatile _Float16 func1n(const _Float16 &arg) {

+    return arg + f2n + arr1n[4] - arr2n[1];

+  }

+}

+

+//CHECK:      |-NamespaceDecl

+//CHECK-NEXT: | |-VarDecl {{.*}} f1n '_Float16'

+//CHECK-NEXT: | |-VarDecl {{.*}} f2n '_Float16' cinit

+//CHECK-NEXT: | | `-FloatingLiteral {{.*}} '_Float16' 3.300000e+01

+//CHECK-NEXT: | |-VarDecl {{.*}} arr1n '_Float16 [10]'

+//CHECK-NEXT: | |-VarDecl {{.*}} arr2n '_Float16 [3]' cinit

+//CHECK-NEXT: | | `-InitListExpr {{.*}} '_Float16 [3]'

+//CHECK-NEXT: | |   |-ImplicitCastExpr {{.*}} '_Float16' <FloatingCast>

+//CHECK-NEXT: | |   | `-FloatingLiteral {{.*}} 'double' 1.200000e+00

+//CHECK-NEXT: | |   |-ImplicitCastExpr {{.*}} '_Float16' <FloatingCast>

+//CHECK-NEXT: | |   | `-FloatingLiteral {{.*}} 'double' 3.000000e+00

+//CHECK-NEXT: | |   `-ImplicitCastExpr {{.*}} '_Float16' <FloatingCast>

+//CHECK-NEXT: | |     `-FloatingLiteral {{.*}} 'double' 3.000000e+04

+//CHECK-NEXT: | `-FunctionDecl {{.*}} func1n 'const volatile _Float16 (const _Float16 &)'

+

+/* File */

+_Float16 f1f;

+_Float16 f2f = 32.4;

+_Float16 arr1f[10];

+_Float16 arr2f[] = { -1.2, -3.0, -3.e4 };

+_Float16 func1f(_Float16 arg);

+

+//CHECK:      |-VarDecl {{.*}} f1f '_Float16'

+//CHECK-NEXT: |-VarDecl {{.*}} f2f '_Float16' cinit

+//CHECK-NEXT: | `-ImplicitCastExpr {{.*}} '_Float16' <FloatingCast>

+//CHECK-NEXT: |   `-FloatingLiteral {{.*}} 'double' 3.240000e+01

+//CHECK-NEXT: |-VarDecl {{.*}} arr1f '_Float16 [10]'

+//CHECK-NEXT: |-VarDecl {{.*}} arr2f '_Float16 [3]' cinit

+//CHECK-NEXT: | `-InitListExpr {{.*}} '_Float16 [3]'

+//CHECK-NEXT: |   |-ImplicitCastExpr {{.*}} '_Float16' <FloatingCast>

+//CHECK-NEXT: |   | `-UnaryOperator {{.*}} 'double' prefix '-'

+//CHECK-NEXT: |   |   `-FloatingLiteral {{.*}} 'double' 1.200000e+00

+//CHECK-NEXT: |   |-ImplicitCastExpr {{.*}} '_Float16' <FloatingCast>

+//CHECK-NEXT: |   | `-UnaryOperator {{.*}} 'double' prefix '-'

+//CHECK-NEXT: |   |   `-FloatingLiteral {{.*}} 'double' 3.000000e+00

+//CHECK-NEXT: |   `-ImplicitCastExpr {{.*}} '_Float16' <FloatingCast>

+//CHECK-NEXT: |     `-UnaryOperator {{.*}} 'double' prefix '-'

+//CHECK-NEXT: |       `-FloatingLiteral {{.*}} 'double' 3.000000e+04

+//CHECK-NEXT: |-FunctionDecl {{.*}} func1f '_Float16 (_Float16)'

+//CHECK-NEXT: | `-ParmVarDecl {{.*}} arg '_Float16'

+

+

+// Mixing __fp16 and Float16 types:

+// The _Float16 type is first converted to __fp16 type and then the operation

+// is completed as if both operands were of __fp16 type.

+

+__fp16 B = -0.1;

+auto C = -1.0f16 + B;

+

+// When we do *not* have native half types, we expect __fp16 to be promoted to

+// float, and consequently also _Float16 promotions to float:

+

+//CHECK:      -VarDecl {{.*}} used B '__fp16' cinit

+//CHECK-NEXT: | `-ImplicitCastExpr {{.*}} '__fp16' <FloatingCast>

+//CHECK-NEXT: |   `-UnaryOperator {{.*}} 'double' prefix '-'

+//CHECK-NEXT: |     `-FloatingLiteral {{.*}} 'double' 1.000000e-01

+//CHECK-NEXT: |-VarDecl {{.*}} C 'float':'float' cinit

+//CHECK-NEXT: | `-BinaryOperator {{.*}} 'float' '+'

+//CHECK-NEXT: |   |-ImplicitCastExpr {{.*}} 'float' <FloatingCast>

+//CHECK-NEXT: |   | `-UnaryOperator {{.*}} '_Float16' prefix '-'

+//CHECK-NEXT: |   |   `-FloatingLiteral {{.*}} '_Float16' 1.000000e+00

+//CHECK-NEXT: |   `-ImplicitCastExpr {{.*}} 'float' <FloatingCast>

+//CHECK-NEXT: |     `-ImplicitCastExpr {{.*}} '__fp16' <LValueToRValue>

+//CHECK-NEXT: |       `-DeclRefExpr {{.*}} '__fp16' lvalue Var 0x{{.*}} 'B' '__fp16'

+

+// When do have native half types, we expect to see promotions to fp16:

+

+//CHECK-NATIVE: |-VarDecl {{.*}} used B '__fp16' cinit

+//CHECK-NATIVE: | `-ImplicitCastExpr {{.*}} '__fp16' <FloatingCast>

+//CHECK-NATIVE: |   `-UnaryOperator {{.*}} 'double' prefix '-'

+//CHECK-NATIVE: |     `-FloatingLiteral {{.*}} 'double' 1.000000e-01

+//CHECK-NATIVE: |-VarDecl {{.*}} C '__fp16':'__fp16' cinit

+//CHECK-NATIVE: | `-BinaryOperator {{.*}} '__fp16' '+'

+//CHECK-NATIVE: |   |-ImplicitCastExpr {{.*}} '__fp16' <FloatingCast>

+//CHECK-NATIVE: |   | `-UnaryOperator {{.*}} '_Float16' prefix '-'

+//CHECK-NATIVE: |   |   `-FloatingLiteral {{.*}} '_Float16' 1.000000e+00

+//CHECK-NATIVE: |   `-ImplicitCastExpr {{.*}} '__fp16' <LValueToRValue>

+//CHECK-NATIVE: |     `-DeclRefExpr {{.*}} '__fp16' lvalue Var 0x{{.*}} 'B' '__fp16'

+

+

+/* Class */

+

+class C1 {

+  _Float16 f1c;

+  static const _Float16 f2c;

+  volatile _Float16 f3c;

+public:

+  C1(_Float16 arg) : f1c(arg), f3c(arg) { }

+  _Float16 func1c(_Float16 arg ) {

+    return f1c + arg;

+  }

+  static _Float16 func2c(_Float16 arg) {

+    return arg * C1::f2c;

+  }

+};

+

+//CHECK:      |-CXXRecordDecl {{.*}} referenced class C1 definition

+//CHECK:      | |-CXXRecordDecl {{.*}} implicit referenced class C1

+//CHECK-NEXT: | |-FieldDecl {{.*}} referenced f1c '_Float16'

+//CHECK-NEXT: | |-VarDecl {{.*}} used f2c 'const _Float16' static

+//CHECK-NEXT: | |-FieldDecl {{.*}} f3c 'volatile _Float16'

+//CHECK-NEXT: | |-AccessSpecDecl

+//CHECK-NEXT: | |-CXXConstructorDecl {{.*}} used C1 'void (_Float16)

+//CHECK-NEXT: | | |-ParmVarDecl {{.*}} used arg '_Float16'

+//CHECK-NEXT: | | |-CXXCtorInitializer Field {{.*}} 'f1c' '_Float16'

+//CHECK-NEXT: | | | `-ImplicitCastExpr {{.*}} '_Float16' <LValueToRValue>

+//CHECK-NEXT: | | |   `-DeclRefExpr {{.*}} '_Float16' lvalue ParmVar 0x{{.*}} 'arg' '_Float16'

+//CHECK-NEXT: | | |-CXXCtorInitializer Field {{.*}} 'f3c' 'volatile _Float16'

+//CHECK-NEXT: | | | `-ImplicitCastExpr {{.*}} '_Float16' <LValueToRValue>

+//CHECK-NEXT: | | |   `-DeclRefExpr {{.*}} '_Float16' lvalue ParmVar 0x{{.*}} 'arg' '_Float16'

+//CHECK-NEXT: | | `-CompoundStmt

+//CHECK-NEXT: | |-CXXMethodDecl {{.*}} used func1c '_Float16 (_Float16)

+//CHECK-NEXT: | | |-ParmVarDecl {{.*}} used arg '_Float16'

+//CHECK-NEXT: | | `-CompoundStmt

+//CHECK-NEXT: | |   `-ReturnStmt

+//CHECK-NEXT: | |     `-BinaryOperator {{.*}} '_Float16' '+'

+//CHECK-NEXT: | |       |-ImplicitCastExpr {{.*}} '_Float16' <LValueToRValue>

+//CHECK-NEXT: | |       | `-MemberExpr {{.*}} '_Float16' lvalue ->f1c 0x{{.*}}

+//CHECK-NEXT: | |       |   `-CXXThisExpr {{.*}} 'C1 *' this

+//CHECK-NEXT: | |       `-ImplicitCastExpr {{.*}} '_Float16' <LValueToRValue>

+//CHECK-NEXT: | |         `-DeclRefExpr {{.*}} '_Float16' lvalue ParmVar 0x{{.*}} 'arg' '_Float16'

+//CHECK-NEXT: | |-CXXMethodDecl {{.*}} used func2c '_Float16 (_Float16)' static

+//CHECK-NEXT: | | |-ParmVarDecl {{.*}} used arg '_Float16'

+//CHECK-NEXT: | | `-CompoundStmt

+//CHECK-NEXT: | |   `-ReturnStmt

+//CHECK-NEXT: | |     `-BinaryOperator {{.*}} '_Float16' '*'

+//CHECK-NEXT: | |       |-ImplicitCastExpr {{.*}} '_Float16' <LValueToRValue>

+//CHECK-NEXT: | |       | `-DeclRefExpr {{.*}} '_Float16' lvalue ParmVar 0x{{.*}} 'arg' '_Float16'

+//CHECK-NEXT: | |       `-ImplicitCastExpr {{.*}} '_Float16' <LValueToRValue>

+//CHECK-NEXT: | |         `-DeclRefExpr {{.*}} 'const _Float16' lvalue Var 0x{{.*}} 'f2c' 'const _Float16'

+

+

+/*  Template */

+

+template <class C> C func1t(C arg) {

+  return arg * 2.f16;

+}

+

+//CHECK:      |-FunctionTemplateDecl {{.*}} func1t

+//CHECK-NEXT: | |-TemplateTypeParmDecl {{.*}} C

+//CHECK-NEXT: | |-FunctionDecl {{.*}} func1t 'C (C)'

+//CHECK-NEXT: | | |-ParmVarDecl {{.*}} referenced arg 'C'

+//CHECK-NEXT: | | `-CompoundStmt

+//CHECK-NEXT: | |   `-ReturnStmt

+//CHECK-NEXT: | |     `-BinaryOperator {{.*}} '<dependent type>' '*'

+//CHECK-NEXT: | |       |-DeclRefExpr {{.*}} 'C' lvalue ParmVar {{.*}} 'arg' 'C'

+//CHECK-NEXT: | |       `-FloatingLiteral {{.*}} '_Float16' 2.000000e+00

+//CHECK-NEXT: | `-FunctionDecl {{.*}} used func1t '_Float16 (_Float16)'

+//CHECK-NEXT: |   |-TemplateArgument type '_Float16'

+//CHECK-NEXT: |   |-ParmVarDecl {{.*}} used arg '_Float16':'_Float16'

+//CHECK-NEXT: |   `-CompoundStmt

+//CHECK-NEXT: |     `-ReturnStmt

+//CHECK-NEXT: |       `-BinaryOperator {{.*}} '_Float16' '*'

+//CHECK-NEXT: |         |-ImplicitCastExpr {{.*}} '_Float16':'_Float16' <LValueToRValue>

+//CHECK-NEXT: |         | `-DeclRefExpr {{.*}} '_Float16':'_Float16' lvalue ParmVar {{.*}} 'arg' '_Float16':'_Float16'

+//CHECK-NEXT: |         `-FloatingLiteral {{.*}} '_Float16' 2.000000e+00

+

+

+template <class C> struct S1 {

+  C mem1;

+};

+

+//CHECK:      |-ClassTemplateDecl {{.*}} S1

+//CHECK-NEXT: | |-TemplateTypeParmDecl {{.*}} referenced class depth 0 index 0 C

+//CHECK-NEXT: | |-CXXRecordDecl {{.*}} struct S1 definition

+//CHECK:      | | |-CXXRecordDecl {{.*}} implicit struct S1

+//CHECK-NEXT: | | `-FieldDecl {{.*}} mem1 'C'

+//CHECK-NEXT: | `-ClassTemplateSpecialization {{.*}} 'S1'

+

+template <> struct S1<_Float16> {

+  _Float16 mem2;

+};

+

+

+/* Local */

+

+extern int printf (const char *__restrict __format, ...);

+

+int main(void) {

+  _Float16 f1l = 1e3f16;

+//CHECK:       | `-VarDecl {{.*}} used f1l '_Float16' cinit

+//CHECK-NEXT:  |   `-FloatingLiteral {{.*}} '_Float16' 1.000000e+03

+

+  _Float16 f2l = -0.f16;

+//CHECK:       | `-VarDecl {{.*}} used f2l '_Float16' cinit

+//CHECK-NEXT:  |   `-UnaryOperator {{.*}} '_Float16' prefix '-'

+//CHECK-NEXT:  |     `-FloatingLiteral {{.*}} '_Float16' 0.000000e+00

+

+  _Float16 f3l = 1.000976562;

+//CHECK:       | `-VarDecl {{.*}} used f3l '_Float16' cinit

+//CHECK-NEXT:  |   `-ImplicitCastExpr {{.*}} '_Float16' <FloatingCast>

+//CHECK-NEXT:  |     `-FloatingLiteral {{.*}} 'double' 1.000977e+00

+

+  C1 c1(f1l);

+//CHECK:       | `-VarDecl{{.*}} used c1 'C1' callinit

+//CHECK-NEXT:  |   `-CXXConstructExpr {{.*}} 'C1' 'void (_Float16)

+//CHECK-NEXT:  |     `-ImplicitCastExpr {{.*}} '_Float16' <LValueToRValue>

+//CHECK-NEXT:  |       `-DeclRefExpr {{.*}} '_Float16' lvalue Var 0x{{.*}} 'f1l' '_Float16'

+

+  S1<_Float16> s1 = { 132.f16 };

+//CHECK:       | `-VarDecl {{.*}} used s1 'S1<_Float16>':'S1<_Float16>' cinit

+//CHECK-NEXT:  |   `-InitListExpr {{.*}} 'S1<_Float16>':'S1<_Float16>'

+//CHECK-NEXT:  |     `-FloatingLiteral {{.*}} '_Float16' 1.320000e+02

+

+  _Float16 f4l = func1n(f1l)  + func1f(f2l) + c1.func1c(f3l) + c1.func2c(f1l) +

+    func1t(f1l) + s1.mem2 - f1n + f2n;

+//CHECK:       | `-VarDecl {{.*}} used f4l '_Float16' cinit

+//CHECK-NEXT:  |   `-BinaryOperator {{.*}} '_Float16' '+'

+//CHECK-NEXT:  |     |-BinaryOperator {{.*}} '_Float16' '-'

+//CHECK-NEXT:  |     | |-BinaryOperator {{.*}} '_Float16' '+'

+//CHECK-NEXT:  |     | | |-BinaryOperator {{.*}} '_Float16' '+'

+//CHECK-NEXT:  |     | | | |-BinaryOperator {{.*}} '_Float16' '+'

+//CHECK-NEXT:  |     | | | | |-BinaryOperator {{.*}} '_Float16' '+'

+//CHECK-NEXT:  |     | | | | | |-BinaryOperator {{.*}} '_Float16' '+'

+//CHECK-NEXT:  |     | | | | | | |-CallExpr {{.*}} '_Float16'

+//CHECK-NEXT:  |     | | | | | | | |-ImplicitCastExpr {{.*}} 'const volatile _Float16 (*)(const _Float16 &)' <FunctionToPointerDecay>

+//CHECK-NEXT:  |     | | | | | | | | `-DeclRefExpr {{.*}} 'const volatile _Float16 (const _Float16 &)' lvalue Function {{.*}} 'func1n' 'const volatile _Float16 (const _Float16 &)'

+//CHECK-NEXT:  |     | | | | | | | `-ImplicitCastExpr {{.*}} 'const _Float16' lvalue <NoOp>

+//CHECK-NEXT:  |     | | | | | | |   `-DeclRefExpr {{.*}} '_Float16' lvalue Var {{.*}} 'f1l' '_Float16'

+//CHECK-NEXT:  |     | | | | | | `-CallExpr {{.*}} '_Float16'

+//CHECK-NEXT:  |     | | | | | |   |-ImplicitCastExpr {{.*}} '_Float16 (*)(_Float16)' <FunctionToPointerDecay>

+//CHECK-NEXT:  |     | | | | | |   | `-DeclRefExpr {{.*}} '_Float16 (_Float16)' lvalue Function {{.*}} 'func1f' '_Float16 (_Float16)'

+//CHECK-NEXT:  |     | | | | | |   `-ImplicitCastExpr {{.*}} '_Float16' <LValueToRValue>

+//CHECK-NEXT:  |     | | | | | |     `-DeclRefExpr {{.*}} '_Float16' lvalue Var {{.*}} 'f2l' '_Float16'

+//CHECK-NEXT:  |     | | | | | `-CXXMemberCallExpr {{.*}} '_Float16'

+//CHECK-NEXT:  |     | | | | |   |-MemberExpr {{.*}} '<bound member function type>' .func1c {{.*}}

+//CHECK-NEXT:  |     | | | | |   | `-DeclRefExpr {{.*}} 'C1' lvalue Var {{.*}} 'c1' 'C1'

+//CHECK-NEXT:  |     | | | | |   `-ImplicitCastExpr {{.*}} '_Float16' <LValueToRValue>

+//CHECK-NEXT:  |     | | | | |     `-DeclRefExpr {{.*}} '_Float16' lvalue Var {{.*}} 'f3l' '_Float16'

+//CHECK-NEXT:  |     | | | | `-CallExpr {{.*}} '_Float16'

+//CHECK-NEXT:  |     | | | |   |-ImplicitCastExpr {{.*}} '_Float16 (*)(_Float16)' <FunctionToPointerDecay>

+//CHECK-NEXT:  |     | | | |   | `-MemberExpr {{.*}} '_Float16 (_Float16)' lvalue .func2c {{.*}}

+//CHECK-NEXT:  |     | | | |   |   `-DeclRefExpr {{.*}} 'C1' lvalue Var {{.*}} 'c1' 'C1'

+//CHECK-NEXT:  |     | | | |   `-ImplicitCastExpr {{.*}} '_Float16' <LValueToRValue>

+//CHECK-NEXT:  |     | | | |     `-DeclRefExpr {{.*}} '_Float16' lvalue Var {{.*}} 'f1l' '_Float16'

+//CHECK-NEXT:  |     | | | `-CallExpr {{.*}} '_Float16':'_Float16'

+//CHECK-NEXT:  |     | | |   |-ImplicitCastExpr {{.*}} '_Float16 (*)(_Float16)' <FunctionToPointerDecay>

+//CHECK-NEXT:  |     | | |   | `-DeclRefExpr {{.*}} '_Float16 (_Float16)' lvalue Function {{.*}} 'func1t' '_Float16 (_Float16)' (FunctionTemplate {{.*}} 'func1t')

+//CHECK-NEXT:  |     | | |   `-ImplicitCastExpr {{.*}} '_Float16' <LValueToRValue>

+//CHECK-NEXT:  |     | | |     `-DeclRefExpr {{.*}} '_Float16' lvalue Var {{.*}} 'f1l' '_Float16'

+//CHECK-NEXT:  |     | | `-ImplicitCastExpr {{.*}} '_Float16' <LValueToRValue>

+//CHECK-NEXT:  |     | |   `-MemberExpr {{.*}} '_Float16' lvalue .mem2 {{.*}}

+//CHECK-NEXT:  |     | |     `-DeclRefExpr {{.*}} 'S1<_Float16>':'S1<_Float16>' lvalue Var {{.*}} 's1' 'S1<_Float16>':'S1<_Float16>'

+//CHECK-NEXT:  |     | `-ImplicitCastExpr {{.*}} '_Float16' <LValueToRValue>

+//CHECK-NEXT:  |     |   `-DeclRefExpr {{.*}} '_Float16' lvalue Var {{.*}} 'f1n' '_Float16'

+//CHECK-NEXT:  |     `-ImplicitCastExpr {{.*}} '_Float16' <LValueToRValue>

+//CHECK-NEXT:  |       `-DeclRefExpr {{.*}} '_Float16' lvalue Var {{.*}} 'f2n' '_Float16'

+

+  auto f5l = -1.f16, *f6l = &f2l, f7l = func1t(f3l);

+//CHECK:       | |-VarDecl {{.*}} f5l '_Float16':'_Float16' cinit

+//CHECK-NEXT:  | | `-UnaryOperator {{.*}} '_Float16' prefix '-'

+//CHECK-NEXT:  | |   `-FloatingLiteral {{.*}} '_Float16' 1.000000e+00

+//CHECK-NEXT:  | |-VarDecl {{.*}} f6l '_Float16 *' cinit

+//CHECK-NEXT:  | | `-UnaryOperator {{.*}} '_Float16 *' prefix '&'

+//CHECK-NEXT:  | |   `-DeclRefExpr {{.*}} '_Float16' lvalue Var {{.*}} 'f2l' '_Float16'

+//CHECK-NEXT:  | `-VarDecl {{.*}} f7l '_Float16':'_Float16' cinit

+//CHECK-NEXT:  |   `-CallExpr {{.*}} '_Float16':'_Float16'

+//CHECK-NEXT:  |     |-ImplicitCastExpr {{.*}} '_Float16 (*)(_Float16)' <FunctionToPointerDecay>

+//CHECK-NEXT:  |     | `-DeclRefExpr {{.*}} '_Float16 (_Float16)' lvalue Function {{.*}} 'func1t' '_Float16 (_Float16)' (FunctionTemplate {{.*}} 'func1t')

+//CHECK-NEXT:  |     `-ImplicitCastExpr {{.*}} '_Float16' <LValueToRValue>

+//CHECK-NEXT:  |       `-DeclRefExpr {{.*}} '_Float16' lvalue Var {{.*}} 'f3l' '_Float16'

+

+  _Float16 f8l = f4l++;

+//CHECK:       | `-VarDecl {{.*}} f8l '_Float16' cinit

+//CHECK-NEXT:  |   `-UnaryOperator {{.*}} '_Float16' postfix '++'

+//CHECK-NEXT:  |     `-DeclRefExpr {{.*}} '_Float16' lvalue Var {{.*}} 'f4l' '_Float16'

+

+  _Float16 arr1l[] = { -1.f16, -0.f16, -11.f16 };

+//CHECK:       `-VarDecl {{.*}} arr1l '_Float16 [3]' cinit

+//CHECK-NEXT:    `-InitListExpr {{.*}} '_Float16 [3]'

+//CHECK-NEXT:      |-UnaryOperator {{.*}} '_Float16' prefix '-'

+//CHECK-NEXT:      | `-FloatingLiteral {{.*}} '_Float16' 1.000000e+00

+//CHECK-NEXT:      |-UnaryOperator {{.*}} '_Float16' prefix '-'

+//CHECK-NEXT:      | `-FloatingLiteral {{.*}} '_Float16' 0.000000e+00

+//CHECK-NEXT:      `-UnaryOperator {{.*}} '_Float16' prefix '-'

+//CHECK-NEXT:        `-FloatingLiteral {{.*}} '_Float16' 1.100000e+01

+

+  float cvtf = f2n;

+//CHECK:       `-VarDecl {{.*}} cvtf 'float' cinit

+//CHECK-NEXT:    `-ImplicitCastExpr {{.*}} 'float' <FloatingCast>

+//CHECK-NEXT:      `-ImplicitCastExpr {{.*}} '_Float16' <LValueToRValue>

+//CHECK-NEXT:        `-DeclRefExpr {{.*}} '_Float16' lvalue Var {{.*}} 'f2n' '_Float16'

+

+  double cvtd = f2n;

+//CHECK:       `-VarDecl {{.*}} cvtd 'double' cinit

+//CHECK-NEXT:    `-ImplicitCastExpr {{.*}} 'double' <FloatingCast>

+//CHECK-NEXT:      `-ImplicitCastExpr {{.*}} '_Float16' <LValueToRValue>

+//CHECK-NEXT:        `-DeclRefExpr {{.*}} '_Float16' lvalue Var {{.*}} 'f2n' '_Float16'

+

+  long double cvtld = f2n;

+//CHECK:       `-VarDecl {{.*}} cvtld 'long double' cinit

+//CHECK-NEXT:    `-ImplicitCastExpr {{.*}} 'long double' <FloatingCast>

+//CHECK-NEXT:      `-ImplicitCastExpr {{.*}} '_Float16' <LValueToRValue>

+//CHECK-NEXT:        `-DeclRefExpr {{.*}} '_Float16' lvalue Var {{.*}} 'f2n' '_Float16'

+

+  _Float16 f2h = 42.0f;

+//CHECK:       `-VarDecl {{.*}} f2h '_Float16' cinit

+//CHECK-NEXT:    `-ImplicitCastExpr {{.*}} '_Float16' <FloatingCast>

+//CHECK-NEXT:      `-FloatingLiteral {{.*}} 'float' 4.200000e+01

+

+  _Float16 d2h = 42.0;

+//CHECK:       `-VarDecl {{.*}} d2h '_Float16' cinit

+//CHECK-NEXT:    `-ImplicitCastExpr {{.*}} '_Float16' <FloatingCast>

+//CHECK-NEXT:      `-FloatingLiteral {{.*}} 'double' 4.200000e+01

+

+  _Float16 ld2h = 42.0l;

+//CHECK:       `-VarDecl {{.*}} ld2h '_Float16' cinit

+//CHECK-NEXT:    `-ImplicitCastExpr {{.*}} '_Float16' <FloatingCast>

+//CHECK-NEXT:      `-FloatingLiteral {{.*}} 'long double' 4.200000e+01

+}

diff --git a/src/third_party/llvm-project/clang/test/Frontend/force-include-not-found.c b/src/third_party/llvm-project/clang/test/Frontend/force-include-not-found.c
new file mode 100644
index 0000000..191cf9d
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/force-include-not-found.c
@@ -0,0 +1,3 @@
+// RUN: not %clang_cc1 %s -include "/abspath/missing file with spaces.h" 2>&1 | FileCheck %s
+// CHECK: file not found
+int main() { }
diff --git a/src/third_party/llvm-project/clang/test/Frontend/ftime-report-template-decl.cpp b/src/third_party/llvm-project/clang/test/Frontend/ftime-report-template-decl.cpp
new file mode 100644
index 0000000..9ba9107
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/ftime-report-template-decl.cpp
@@ -0,0 +1,159 @@
+// RUN: %clang_cc1 %s -emit-llvm -o - -ftime-report  2>&1 | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -o - -fdelayed-template-parsing -DDELAYED_TEMPLATE_PARSING -ftime-report  2>&1 | FileCheck %s
+
+// Template function declarations
+template <typename T>
+void foo();
+template <typename T, typename U>
+void foo();
+
+// Template function definitions.
+template <typename T>
+void foo() {}
+
+// Template class (forward) declarations
+template <typename T>
+struct A;
+template <typename T, typename U>
+struct b;
+template <typename>
+struct C;
+template <typename, typename>
+struct D;
+
+// Forward declarations with default parameters?
+template <typename T = int>
+class X1;
+template <typename = int>
+class X2;
+
+// Forward declarations w/template template parameters
+template <template <typename> class T>
+class TTP1;
+template <template <typename> class>
+class TTP2;
+template <template <typename X, typename Y> class T>
+class TTP5;
+
+// Forward declarations with non-type params
+template <int>
+class NTP0;
+template <int N>
+class NTP1;
+template <int N = 5>
+class NTP2;
+template <int = 10>
+class NTP3;
+template <unsigned int N = 12u>
+class NTP4;
+template <unsigned int = 12u>
+class NTP5;
+template <unsigned = 15u>
+class NTP6;
+template <typename T, T Obj>
+class NTP7;
+
+// Template class declarations
+template <typename T>
+struct A {};
+template <typename T, typename U>
+struct B {};
+
+namespace PR6184 {
+namespace N {
+template <typename T>
+void bar(typename T::x);
+}
+
+template <typename T>
+void N::bar(typename T::x) {}
+}
+
+// This PR occurred only in template parsing mode.
+namespace PR17637 {
+template <int>
+struct L {
+  template <typename T>
+  struct O {
+    template <typename U>
+    static void Fun(U);
+  };
+};
+
+template <int k>
+template <typename T>
+template <typename U>
+void L<k>::O<T>::Fun(U) {}
+
+void Instantiate() { L<0>::O<int>::Fun(0); }
+}
+
+namespace explicit_partial_specializations {
+typedef char (&oneT)[1];
+typedef char (&twoT)[2];
+typedef char (&threeT)[3];
+typedef char (&fourT)[4];
+typedef char (&fiveT)[5];
+typedef char (&sixT)[6];
+
+char one[1];
+char two[2];
+char three[3];
+char four[4];
+char five[5];
+char six[6];
+
+template <bool b>
+struct bool_ { typedef int type; };
+template <>
+struct bool_<false> {};
+
+#define XCAT(x, y) x##y
+#define CAT(x, y) XCAT(x, y)
+#define sassert(_b_) bool_<(_b_)>::type CAT(var, __LINE__);
+
+template <int>
+struct L {
+  template <typename T>
+  struct O {
+    template <typename U>
+    static oneT Fun(U);
+  };
+};
+template <int k>
+template <typename T>
+template <typename U>
+oneT L<k>::O<T>::Fun(U) { return one; }
+
+template <>
+template <>
+template <typename U>
+oneT L<0>::O<char>::Fun(U) { return one; }
+
+void Instantiate() {
+  sassert(sizeof(L<0>::O<int>::Fun(0)) == sizeof(one));
+  sassert(sizeof(L<0>::O<char>::Fun(0)) == sizeof(one));
+}
+}
+
+template <class>
+struct Foo {
+  template <class _Other>
+  using rebind_alloc = _Other;
+};
+template <class _Alloc>
+struct _Wrap_alloc {
+  template <class _Other>
+  using rebind_alloc = typename Foo<_Alloc>::template rebind_alloc<_Other>;
+  template <class>
+  using rebind = _Wrap_alloc;
+};
+_Wrap_alloc<int>::rebind<int> w;
+
+// CHECK: Miscellaneous Ungrouped Timers
+// CHECK-DAG: LLVM IR Generation Time
+// CHECK-DAG: Code Generation Time
+// CHECK: Total
+// CHECK: Clang front-end time report
+// CHECK: Clang front-end timer
+// CHECK: Total
diff --git a/src/third_party/llvm-project/clang/test/Frontend/gnu-inline.c b/src/third_party/llvm-project/clang/test/Frontend/gnu-inline.c
new file mode 100644
index 0000000..75d4fe6
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/gnu-inline.c
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -std=c89 -fsyntax-only -x c -E -dM %s | FileCheck --check-prefix=GNU-INLINE %s
+// RUN: %clang_cc1 -std=c99 -fsyntax-only -x c -E -dM %s | FileCheck --check-prefix=STDC-INLINE %s
+// RUN: %clang_cc1 -std=c99 -fgnu89-inline -fsyntax-only -x c -E -dM %s | FileCheck --check-prefix=GNU-INLINE %s
+// RUN: %clang_cc1 -fsyntax-only -x c++ -E -dM %s | FileCheck --check-prefix=GNU-INLINE %s
+// RUN: not %clang_cc1 -fgnu89-inline -fsyntax-only -x c++ %s 2>&1 | FileCheck --check-prefix=CXX %s
+// RUN: not %clang_cc1 -fgnu89-inline -fsyntax-only -x objective-c++ %s 2>&1 | FileCheck --check-prefix=OBJCXX %s
+
+// CXX: '-fgnu89-inline' not allowed with 'C++'
+// OBJCXX: '-fgnu89-inline' not allowed with 'Objective-C++'
+
+// STDC-INLINE-NOT: __GNUC_GNU_INLINE__
+// STDC-INLINE: #define __GNUC_STDC_INLINE__ 1
+// STDC-INLINE-NOT: __GNUC_GNU_INLINE__
+
+// GNU-INLINE-NOT: __GNUC_STDC_INLINE__
+// GNU-INLINE: #define __GNUC_GNU_INLINE__ 1
+// GNU-INLINE-NOT: __GNUC_STDC_INLINE__
diff --git a/src/third_party/llvm-project/clang/test/Frontend/gnu-mcount.c b/src/third_party/llvm-project/clang/test/Frontend/gnu-mcount.c
new file mode 100644
index 0000000..baac555
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/gnu-mcount.c
@@ -0,0 +1,78 @@
+// REQUIRES: arm-registered-target,aarch64-registered-target
+
+// RUN: %clang -target armv7-unknown-none-eabi -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM-BAREMETAL-EABI
+// RUN: %clang -target armv7-unknown-none-eabi -pg -meabi gnu -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM-BAREMETAL-EABI-MEABI-GNU
+// RUN: %clang -target aarch64-unknown-none-eabi -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM64-BAREMETAL-EABI
+// RUN: %clang -target aarch64-unknown-none-eabi -pg -meabi gnu -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM64-BAREMETAL-EABI-MEABI-GNU
+// RUN: %clang -target armv7-unknown-linux-gnueabi -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM-EABI
+// RUN: %clang -target armv7-unknown-linux-gnueabi -meabi gnu -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM-EABI-MEABI-GNU
+// RUN: %clang -target aarch64-unknown-linux-gnueabi -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM64-EABI-LINUX
+// RUN: %clang -target aarch64-unknown-linux-gnueabi -meabi gnu -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM64-EABI-MEABI-GNU
+// RUN: %clang -target armv7-unknown-linux-gnueabihf -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM-EABI
+// RUN: %clang -target armv7-unknown-linux-gnueabihf -meabi gnu -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM-EABI-MEABI-GNU
+// RUN: %clang -target aarch64-unknown-linux-gnueabihf -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM64-EABI-LINUX
+// RUN: %clang -target aarch64-unknown-linux-gnueabihf -meabi gnu -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM64-EABI-MEABI-GNU
+// RUN: %clang -target armv7-unknown-freebsd-gnueabihf -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM-EABI-FREEBSD
+// RUN: %clang -target armv7-unknown-freebsd-gnueabihf -meabi gnu -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM-EABI-FREEBSD
+// RUN: %clang -target aarch64-unknown-freebsd-gnueabihf -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM64-EABI-FREEBSD
+// RUN: %clang -target aarch64-unknown-freebsd-gnueabihf -meabi gnu -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM64-EABI-FREEBSD
+// RUN: %clang -target armv7-unknown-openbsd-gnueabihf -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM-EABI-OPENBSD
+// RUN: %clang -target armv7-unknown-openbsd-gnueabihf -meabi gnu -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM-EABI-OPENBSD
+// RUN: %clang -target aarch64-unknown-openbsd-gnueabihf -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM64-EABI-OPENBSD
+// RUN: %clang -target aarch64-unknown-openbsd-gnueabihf -meabi gnu -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM64-EABI-OPENBSD
+// RUN: %clang -target armv7-unknown-netbsd-gnueabihf -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM-EABI-NETBSD
+// RUN: %clang -target armv7-unknown-netbsd-gnueabihf -meabi gnu -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM-EABI-NETBSD
+// RUN: %clang -target aarch64-unknown-netbsd-gnueabihf -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM64-EABI-NETBSD
+// RUN: %clang -target aarch64-unknown-netbsd-gnueabihf -meabi gnu -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM64-EABI-NETBSD
+// RUN: %clang -target armv7-apple-ios -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM-IOS
+// RUN: %clang -target armv7-apple-ios -pg -meabi gnu -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM-IOS
+// RUN: %clang -target arm64-apple-ios -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM-IOS
+// RUN: %clang -target arm64-apple-ios -pg -meabi gnu -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM-IOS
+// RUN: %clang -target armv7-unknown-rtems-gnueabihf -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM-EABI-RTEMS
+// RUN: %clang -target armv7-unknown-rtems-gnueabihf -meabi gnu -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM-EABI-RTEMS
+// RUN: %clang -target aarch64-unknown-rtems-gnueabihf -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM64-EABI-RTEMS
+// RUN: %clang -target aarch64-unknown-rtems-gnueabihf -meabi gnu -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM64-EABI-RTEMS
+// RUN: %clang -target armv7-unknown-cloudabi-gnueabihf -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM-EABI-CLOUDABI
+// RUN: %clang -target armv7-unknown-cloudabi-gnueabihf -meabi gnu -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM-EABI-CLOUDABI
+// RUN: %clang -target aarch64-unknown-cloudabi-gnueabihf -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM64-EABI-CLOUDABI
+// RUN: %clang -target aarch64-unknown-cloudabi-gnueabihf -meabi gnu -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ARM64-EABI-CLOUDABI
+
+int f() {
+  return 0;
+}
+
+// CHECK-LABEL: f
+// TODO: add profiling support for arm-baremetal
+// CHECK-ARM-BAREMETAL-EABI-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01mcount"{{.*}} }
+// CHECK-ARM-BAREMETAL-EABI-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
+// CHECK-ARM64-BAREMETAL-EABI: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="mcount"{{.*}} }
+// CHECK-ARM64-BAREMETAL-EABI-MEABI-GNU: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01_mcount"{{.*}} }
+// CHECK-ARM-IOS-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="_mcount"{{.*}} }
+// CHECK-ARM-IOS-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
+// CHECK-ARM-EABI: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01mcount"{{.*}} }
+// CHECK-ARM-EABI-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
+// CHECK-ARM64-EABI: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="mcount"{{.*}} }
+// CHECK-ARM64-EABI-MEABI-GNU: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01_mcount"{{.*}} }
+// CHECK-ARM64-EABI-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
+// CHECK-ARM64-EABI-LINUX: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01_mcount"{{.*}} }
+// CHECK-ARM-EABI-FREEBSD: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="__mcount"{{.*}} }
+// CHECK-ARM-EABI-FREEBSD-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
+// CHECK-ARM64-EABI-FREEBSD: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"=".mcount"{{.*}} }
+// CHECK-ARM64-EABI-FREEBSD-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
+// CHECK-ARM-EABI-NETBSD: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="__mcount"{{.*}} }
+// CHECK-ARM-EABI-NETBSD-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
+// CHECK-ARM-EABI-OPENBSD: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="__mcount"{{.*}} }
+// CHECK-ARM-EABI-OPENBSD-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
+// CHECK-ARM64-EABI-OPENBSD: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="__mcount"{{.*}} }
+// CHECK-ARM64-EABI-OPENBSD-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
+// CHECK-ARM-EABI-MEABI-GNU-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="mcount"{{.*}} }
+// CHECK-ARM-EABI-MEABI-GNU: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
+// CHECK-ARM-EABI-RTEMS: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="mcount"{{.*}} }
+// CHECK-ARM-EABI-RTEMS-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
+// CHECK-ARM64-EABI-RTEMS: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="mcount"{{.*}} }
+// CHECK-ARM64-EABI-RTEMS-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
+// CHECK-ARM-EABI-CLOUDABI: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="mcount"{{.*}} }
+// CHECK-ARM-EABI-CLOUDABI-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
+// CHECK-ARM64-EABI-CLOUDABI: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="mcount"{{.*}} }
+// CHECK-ARM64-EABI-CLOUDABI-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
+
diff --git a/src/third_party/llvm-project/clang/test/Frontend/hexagon-target-basic.c b/src/third_party/llvm-project/clang/test/Frontend/hexagon-target-basic.c
new file mode 100644
index 0000000..5f95fa2
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/hexagon-target-basic.c
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -emit-llvm -triple hexagon-unknown-unknown %s -S -o /dev/null
+// REQUIRES: hexagon-registered-target
+
+// Testcase for bug 14744.  Empty file is sufficient, since the problem
+// was a bad data layout string in the Hexagon target causing an ICE
+// when compiling any Hexagon program.
+
+int x;  // In C99, a translation unit needs to have at least one declaration.
+
diff --git a/src/third_party/llvm-project/clang/test/Frontend/iframework.c b/src/third_party/llvm-project/clang/test/Frontend/iframework.c
new file mode 100644
index 0000000..2354553
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/iframework.c
@@ -0,0 +1,5 @@
+// RUN: %clang -fsyntax-only -iframework %S/Inputs %s -Xclang -verify
+// RUN: %clang -fsyntax-only -isysroot %S -iframeworkwithsysroot /Inputs %s -Xclang -verify
+// expected-no-diagnostics
+
+#include <TestFramework/TestFramework.h>
diff --git a/src/third_party/llvm-project/clang/test/Frontend/include-duplicate-removal.c b/src/third_party/llvm-project/clang/test/Frontend/include-duplicate-removal.c
new file mode 100644
index 0000000..fb02cd7
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/include-duplicate-removal.c
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -v -I%S/Inputs -iquote %S/Inputs/SystemHeaderPrefix -isystem %S/Inputs/SystemHeaderPrefix -isystem %S/Inputs/SystemHeaderPrefix %s 2>&1 | FileCheck %s
+
+#include <test.h>
+
+// CHECK: ignoring duplicate directory
+// CHECK-SAME: Inputs/SystemHeaderPrefix"{{$}}
+
+// CHECK:      #include "..."
+// CHECK-NEXT: {{.*}}Inputs/SystemHeaderPrefix{{$}}
+// CHECK-NEXT: #include <...>
+// CHECK-NEXT: {{.*}}Inputs{{$}}
+// CHECK-NEXT: {{.*}}Inputs/SystemHeaderPrefix{{$}}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/int128.cpp b/src/third_party/llvm-project/clang/test/Frontend/int128.cpp
new file mode 100644
index 0000000..145144a
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/int128.cpp
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -x c   -std=gnu99   -dM -E -triple x86_64-pc-linux %s | FileCheck -check-prefix=NO %s
+// RUN: %clang_cc1 -x c++ -std=c++11   -dM -E -triple x86_64-pc-linux %s | FileCheck -check-prefix=NO %s
+// RUN: %clang_cc1 -x c++ -std=gnu++11 -dM -E -triple i686-pc-linux   %s | FileCheck -check-prefix=NO %s
+// RUN: %clang_cc1 -x c++ -std=gnu++11 -dM -E -triple x86_64-pc-linux %s | FileCheck -check-prefix=YES %s
+// RUN: %clang_cc1 -x c++ -std=gnu++1y -dM -E -triple x86_64-pc-linux %s | FileCheck -check-prefix=YES %s
+// PR23156
+
+// NO-NOT: __GLIBCXX_TYPE_INT_N_0
+// NO-NOT: __GLIBCXX_BITSIZE_INT_N_0
+// YES-DAG: __GLIBCXX_TYPE_INT_N_0
+// YES-DAG: __GLIBCXX_BITSIZE_INT_N_0
diff --git a/src/third_party/llvm-project/clang/test/Frontend/invalid-o-level.c b/src/third_party/llvm-project/clang/test/Frontend/invalid-o-level.c
new file mode 100644
index 0000000..0314448
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/invalid-o-level.c
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 %s -O900 -o /dev/null 2>&1 | FileCheck %s
+
+// RUN: %clang_cc1 %s -O8 -o /dev/null 2>&1 | FileCheck %s
+
+// CHECK: warning: optimization level '-O{{.*}}' is not supported; using '-O3' instead
diff --git a/src/third_party/llvm-project/clang/test/Frontend/ir-support-codegen.ll b/src/third_party/llvm-project/clang/test/Frontend/ir-support-codegen.ll
new file mode 100644
index 0000000..3dc3c0a
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/ir-support-codegen.ll
@@ -0,0 +1,15 @@
+; REQUIRES: x86-registered-target
+; RUN: %clang_cc1 -triple x86_64-apple-darwin10 -S -o - %s | FileCheck %s
+
+; RUN: %clang_cc1 -triple x86_64-pc-linux -S -o %t %s 2>&1 | \
+; RUN: FileCheck --check-prefix=WARN %s
+; WARN: warning: overriding the module target triple with x86_64-pc-linux
+; RUN: FileCheck --check-prefix=LINUX %s < %t
+
+target triple = "x86_64-apple-darwin10"
+
+; CHECK: .globl _f0
+; LINUX: .globl f0
+define i32 @f0() nounwind ssp {
+       ret i32 0
+}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/ir-support-errors.ll b/src/third_party/llvm-project/clang/test/Frontend/ir-support-errors.ll
new file mode 100644
index 0000000..daf1675
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/ir-support-errors.ll
@@ -0,0 +1,8 @@
+; RUN: not %clang_cc1 -S -o - %s 2>&1 | FileCheck %s
+
+target triple = "x86_64-apple-darwin10"
+
+define i32 @f0() nounwind ssp {
+; CHECK: {{.*}}ir-support-errors.ll:7:16: error: use of undefined value '%x'
+       ret i32 %x
+}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/ir-support.c b/src/third_party/llvm-project/clang/test/Frontend/ir-support.c
new file mode 100644
index 0000000..f69161e
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/ir-support.c
@@ -0,0 +1,19 @@
+// Test that we can consume LLVM IR/bitcode in the frontend and produce
+// equivalent output to a standard compilation.
+
+// We strip differing '.file' directives before comparing.
+
+// Reference output:
+// RUN: %clang_cc1 -S -o - %s | grep -v '\.file' > %t.s
+
+// LLVM bitcode:
+// RUN: %clang_cc1 -emit-llvm-bc -o %t.bc %s
+// RUN: %clang_cc1 -S -o - %t.bc | grep -v '\.file' > %t.bc.s
+// RUN: diff %t.s %t.bc.s
+
+// LLVM IR source code:
+// RUN: %clang_cc1 -emit-llvm -o %t.ll %s
+// RUN: %clang_cc1 -S -o - %t.ll | grep -v '\.file' > %t.ll.s
+// RUN: diff %t.s %t.ll.s
+
+int f() { return 0; }
diff --git a/src/third_party/llvm-project/clang/test/Frontend/lit.local.cfg b/src/third_party/llvm-project/clang/test/Frontend/lit.local.cfg
new file mode 100644
index 0000000..7a05c5d
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/lit.local.cfg
@@ -0,0 +1 @@
+config.suffixes = ['.c', '.cpp', '.m', '.mm', '.ll', '.cl']
diff --git a/src/third_party/llvm-project/clang/test/Frontend/macros.c b/src/third_party/llvm-project/clang/test/Frontend/macros.c
new file mode 100644
index 0000000..68f2203
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/macros.c
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -DA= -DB=1 -verify -fsyntax-only %s
+// expected-no-diagnostics
+
+int a[(B A) == 1 ? 1 : -1];
+
+
+// PR13747 - Don't warn about unused results with statement exprs in macros.
+void stuff(int,int,int);
+#define memset(x,y,z) ({ stuff(x,y,z); x; })
+
+void foo(int a, int b, int c) {
+  memset(a,b,c);  // No warning!
+}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/mfpmath.c b/src/third_party/llvm-project/clang/test/Frontend/mfpmath.c
new file mode 100644
index 0000000..f650e48
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/mfpmath.c
@@ -0,0 +1,43 @@
+// RUN: %clang_cc1 -triple i686-pc-linux -target-feature -sse  %s
+
+// RUN: %clang_cc1 -triple i686-pc-linux -target-feature -sse -mfpmath 387 %s
+
+// RUN: %clang_cc1 -triple i686-pc-linux -target-feature +sse %s
+
+// RUN: %clang_cc1 -triple i686-pc-linux -target-feature +sse -mfpmath sse %s
+
+// RUN: not %clang_cc1 -triple i686-pc-linux -target-feature +sse \
+// RUN: -mfpmath xyz %s 2>&1 | FileCheck --check-prefix=CHECK-XYZ %s
+// CHECK-XYZ: error: unknown FP unit 'xyz'
+
+// RUN: not %clang_cc1 -triple i686-pc-linux -target-feature +sse \
+// RUN: -mfpmath 387 %s 2>&1 | FileCheck --check-prefix=CHECK-NO-387 %s
+// CHECK-NO-387: error: the '387' unit is not supported with this instruction set
+
+// RUN: not %clang_cc1 -triple i686-pc-linux -target-feature -sse \
+// RUN: -mfpmath sse %s 2>&1 | FileCheck --check-prefix=CHECK-NO-SSE %s
+// CHECK-NO-SSE: error: the 'sse' unit is not supported with this instruction set
+
+
+// RUN: %clang_cc1 -triple arm-apple-darwin10 -mfpmath vfp %s
+
+// RUN: %clang_cc1 -triple arm-apple-darwin10 -mfpmath vfp2 %s
+
+// RUN: %clang_cc1 -triple arm-apple-darwin10 -mfpmath vfp3 %s
+
+// RUN: %clang_cc1 -triple arm-apple-darwin10 -mfpmath vfp4 %s
+
+// RUN: %clang_cc1 -triple arm-apple-darwin10 -target-cpu cortex-a9 \
+// RUN: -mfpmath neon %s
+
+// RUN: not %clang_cc1 -triple arm-apple-darwin10 -mfpmath foo %s 2>&1 \
+// RUN: FileCheck --check-prefix=CHECK-FOO %s
+// CHECK-FOO: unknown FP unit 'foo'
+
+// RUN: not %clang_cc1 -triple arm-apple-darwin10 -target-cpu arm1136j-s \
+// RUN: -mfpmath neon %s 2>&1 | FileCheck --check-prefix=CHECK-NO-NEON %s
+
+// RUN: not %clang_cc1 -triple arm-apple-darwin10 -target-cpu cortex-a9 \
+// RUN: -target-feature -neon -mfpmath neon %s 2>&1 | FileCheck --check-prefix=CHECK-NO-NEON %s
+
+// CHECK-NO-NEON: error: the 'neon' unit is not supported with this instruction set
diff --git a/src/third_party/llvm-project/clang/test/Frontend/mips-long-double.c b/src/third_party/llvm-project/clang/test/Frontend/mips-long-double.c
new file mode 100644
index 0000000..09de38c
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/mips-long-double.c
@@ -0,0 +1,19 @@
+// RUN: %clang_cc1 -triple mips64-unknown-freebsd -std=c11 -verify %s
+// RUN: %clang_cc1 -triple mips-unknown-freebsd -std=c11 -verify %s
+// RUN: %clang_cc1 -triple mips-unknown-linux -std=c11 -verify %s
+// RUN: %clang_cc1 -triple mips64-unknown-linux -std=c11 -verify %s
+// expected-no-diagnostics
+
+#ifdef _ABI64
+#  ifdef __FreeBSD__
+_Static_assert(sizeof(long double) == 8, "sizeof long double is wrong");
+_Static_assert(_Alignof(long double) == 8, "alignof long double is wrong");
+#  else
+_Static_assert(sizeof(long double) == 16, "sizeof long double is wrong");
+_Static_assert(_Alignof(long double) == 16, "alignof long double is wrong");
+#  endif
+#else
+_Static_assert(sizeof(long double) == 8, "sizeof long double is wrong");
+_Static_assert(_Alignof(long double) == 8, "alignof long double is wrong");
+#endif
+
diff --git a/src/third_party/llvm-project/clang/test/Frontend/nostdlib-for-asmpp.s b/src/third_party/llvm-project/clang/test/Frontend/nostdlib-for-asmpp.s
new file mode 100644
index 0000000..330fee3
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/nostdlib-for-asmpp.s
@@ -0,0 +1,5 @@
+// RUN: %clang -cc1 -x assembler-with-cpp -triple arm64-apple-ios6.0.0 -isysroot %S/doesnotexist -std=c++11 -v %s 2>&1 | FileCheck %s
+// The C++ stdlib path should not be included for an assembly source.
+
+// CHECK-NOT: usr/include/c++/
+// CHECK-NOT: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead
diff --git a/src/third_party/llvm-project/clang/test/Frontend/objc-bool-is-bool.m b/src/third_party/llvm-project/clang/test/Frontend/objc-bool-is-bool.m
new file mode 100644
index 0000000..ee4fb58
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/objc-bool-is-bool.m
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -fsyntax-only -E -dM -triple=armv7k-apple-watchos %s | FileCheck --check-prefix=BOOL %s
+// RUN: %clang_cc1 -fsyntax-only -E -dM -triple=x86_64-apple-darwin16 %s | FileCheck --check-prefix=CHAR %s
+// RUN: %clang_cc1 -x c -fsyntax-only -E -dM -triple=x86_64-apple-darwin16 %s | FileCheck --check-prefix=CHAR %s
+// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -E -dM -triple=x86_64-apple-darwin16 %s | FileCheck --check-prefix=CHAR %s
+// RUN: %clang_cc1 -x c++ -fsyntax-only -E -dM -triple=x86_64-apple-darwin16 %s | FileCheck --check-prefix=CHAR %s
+
+// rdar://21170440
+
+// BOOL: #define __OBJC_BOOL_IS_BOOL 1
+// BOOL-NOT: #define __OBJC_BOOL_IS_BOOL 0
+
+// CHAR: #define __OBJC_BOOL_IS_BOOL 0
+// CHAR-NOT: #define __OBJC_BOOL_IS_BOOL 1
diff --git a/src/third_party/llvm-project/clang/test/Frontend/opencl.cl b/src/third_party/llvm-project/clang/test/Frontend/opencl.cl
new file mode 100644
index 0000000..facc735
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/opencl.cl
@@ -0,0 +1,36 @@
+// RUN: %clang_cc1 %s -verify -fsyntax-only -DSYNTAX
+// RUN: %clang_cc1 %s -verify -fsyntax-only -cl-std=CL1.1 -DSYNTAX
+// RUN: %clang_cc1 %s -verify -fsyntax-only -cl-std=CL1.2 -DSYNTAX
+// RUN: %clang_cc1 %s -verify -fsyntax-only -cl-std=CL2.0 -DSYNTAX
+// RUN: %clang_cc1 %s -verify -fsyntax-only -cl-std=c++ -DSYNTAX
+// RUN: %clang_cc1 %s -verify -fsyntax-only -fblocks -DBLOCKS -DSYNTAX
+// RUN: %clang_cc1 %s -verify -fsyntax-only -cl-std=CL1.1 -fblocks -DBLOCKS -DSYNTAX
+// RUN: %clang_cc1 %s -verify -fsyntax-only -cl-std=CL1.2 -fblocks -DBLOCKS -DSYNTAX
+// RUN: %clang_cc1 %s -triple amdgcn--amdhsa -x c -std=c99 -verify -fsyntax-only -DSYNTAX
+// RUN: %clang_cc1 -cl-std=CL1.1 -cl-strict-aliasing -fblocks %s 2>&1 | FileCheck --check-prefix=CHECK-INVALID-OPENCL-VERSION11 %s
+// RUN: %clang_cc1 -cl-std=CL1.2 -cl-strict-aliasing -fblocks %s 2>&1 | FileCheck --check-prefix=CHECK-INVALID-OPENCL-VERSION12 %s
+// RUN: %clang_cc1 -cl-std=CL2.0 -cl-strict-aliasing %s 2>&1 | FileCheck --check-prefix=CHECK-INVALID-OPENCL-VERSION20 %s
+
+#ifdef SYNTAX
+class test{
+int member;
+};
+#ifndef __OPENCL_CPP_VERSION__
+//expected-error@-4{{unknown type name 'class'}}
+//expected-error@-5{{expected ';' after top level declarator}}
+#endif
+#endif
+
+void f(void (^g)(void)) {
+#if defined(__OPENCL_C_VERSION__) || defined(__OPENCL_CPP_VERSION__)
+#if !defined(BLOCKS) && (defined(__OPENCL_CPP_VERSION__)  || __OPENCL_C_VERSION__ != CL_VERSION_2_0)
+  // expected-error@-3{{blocks support disabled - compile with -fblocks or for OpenCL 2.0}}
+#endif
+#else
+  // expected-error@-6{{blocks support disabled - compile with -fblocks or pick a deployment target that supports them}}
+#endif
+}
+
+// CHECK-INVALID-OPENCL-VERSION11: warning: OpenCL version 1.1 does not support the option '-cl-strict-aliasing'
+// CHECK-INVALID-OPENCL-VERSION12: warning: OpenCL version 1.2 does not support the option '-cl-strict-aliasing'
+// CHECK-INVALID-OPENCL-VERSION20: warning: OpenCL version 2.0 does not support the option '-cl-strict-aliasing'
diff --git a/src/third_party/llvm-project/clang/test/Frontend/optimization-remark-analysis.c b/src/third_party/llvm-project/clang/test/Frontend/optimization-remark-analysis.c
new file mode 100644
index 0000000..b396327
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/optimization-remark-analysis.c
@@ -0,0 +1,21 @@
+// RUN: %clang -O1 -fvectorize -target x86_64-unknown-unknown -emit-llvm -Rpass-analysis -S %s -o - 2>&1 | FileCheck %s --check-prefix=RPASS
+// RUN: %clang -O1 -fvectorize -target x86_64-unknown-unknown -emit-llvm -S %s -o - 2>&1 | FileCheck %s
+
+// RPASS: {{.*}}:7:8: remark: loop not vectorized: loop contains a switch statement
+// CHECK-NOT: {{.*}}:7:8: remark: loop not vectorized: loop contains a switch statement
+
+double foo(int N, int *Array) {
+  double v = 0.0;
+
+  #pragma clang loop vectorize(enable)
+  for (int i = 0; i < N; i++) {
+    switch(Array[i]) {
+    case 0: v += 1.0f; break;
+    case 1: v -= 0.5f; break;
+    case 2: v *= 2.0f; break;
+    default: v = 0.0f;
+    }
+  }
+
+  return v;
+}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/optimization-remark-extra-analysis.c b/src/third_party/llvm-project/clang/test/Frontend/optimization-remark-extra-analysis.c
new file mode 100644
index 0000000..1a8415e
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/optimization-remark-extra-analysis.c
@@ -0,0 +1,11 @@
+// Test that the is*RemarkEnabled overrides are working properly.  This remark
+// requiring extra analysis is only conditionally enabled.
+
+// RUN: %clang_cc1 %s -Rpass-missed=gvn -O2 -emit-llvm-only -verify
+
+int foo(int *x, int *y) {
+  int a = *x;
+  *y = 2;
+  // expected-remark@+1 {{load of type i32 not eliminated}}
+  return a + *x;
+}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/optimization-remark-line-directive.c b/src/third_party/llvm-project/clang/test/Frontend/optimization-remark-line-directive.c
new file mode 100644
index 0000000..8e95e33
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/optimization-remark-line-directive.c
@@ -0,0 +1,12 @@
+// This file tests -Rpass diagnostics together with #line
+// directives. We cannot map #line directives back to
+// a SourceLocation.
+
+// RUN: %clang_cc1 %s -Rpass=inline -debug-info-kind=line-tables-only -dwarf-column-info -emit-llvm-only -verify
+
+int foo(int x, int y) __attribute__((always_inline));
+int foo(int x, int y) { return x + y; }
+
+// expected-remark@+2 {{foo inlined into bar}} expected-note@+2 {{could not determine the original source location for /bad/path/to/original.c:1230:25}}
+#line 1230 "/bad/path/to/original.c"
+int bar(int j) { return foo(j, j - 2); }
diff --git a/src/third_party/llvm-project/clang/test/Frontend/optimization-remark-options.c b/src/third_party/llvm-project/clang/test/Frontend/optimization-remark-options.c
new file mode 100644
index 0000000..38dbbfb
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/optimization-remark-options.c
@@ -0,0 +1,21 @@
+// RUN: %clang -O1 -fvectorize -target x86_64-unknown-unknown -Rpass-analysis=loop-vectorize -emit-llvm -S %s -o - 2>&1 | FileCheck %s
+
+// CHECK: {{.*}}:9:11: remark: loop not vectorized: cannot prove it is safe to reorder floating-point operations; allow reordering by specifying '#pragma clang loop vectorize(enable)' before the loop or by providing the compiler option '-ffast-math'.
+
+double foo(int N) {
+  double v = 0.0;
+
+  for (int i = 0; i < N; i++)
+    v = v + 1.0;
+
+  return v;
+}
+
+// CHECK: {{.*}}:17:3: remark: loop not vectorized: cannot prove it is safe to reorder memory operations; allow reordering by specifying '#pragma clang loop vectorize(enable)' before the loop. If the arrays will always be independent specify '#pragma clang loop vectorize(assume_safety)' before the loop or provide the '__restrict__' qualifier with the independent array arguments. Erroneous results will occur if these options are incorrectly applied!
+
+void foo2(int *dw, int *uw, int *A, int *B, int *C, int *D, int N) {
+  for (long i = 0; i < N; i++) {
+    dw[i] = A[i] + B[i - 1] + C[i - 2] + D[i - 3];
+    uw[i] = A[i] + B[i + 1] + C[i + 2] + D[i + 3];
+  }
+}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/optimization-remark-with-hotness.c b/src/third_party/llvm-project/clang/test/Frontend/optimization-remark-with-hotness.c
new file mode 100644
index 0000000..6d3ab06
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/optimization-remark-with-hotness.c
@@ -0,0 +1,72 @@
+// Generate instrumentation and sampling profile data.
+// RUN: llvm-profdata merge \
+// RUN:     %S/Inputs/optimization-remark-with-hotness.proftext \
+// RUN:     -o %t.profdata
+// RUN: llvm-profdata merge -sample \
+// RUN:     %S/Inputs/optimization-remark-with-hotness-sample.proftext \
+// RUN:     -o %t-sample.profdata
+//
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name \
+// RUN:     optimization-remark-with-hotness.c %s -emit-llvm-only \
+// RUN:     -fprofile-instrument-use-path=%t.profdata -Rpass=inline \
+// RUN:     -Rpass-analysis=inline -Rpass-missed=inline \
+// RUN:     -fdiagnostics-show-hotness -verify
+// The clang version of the previous test.
+// RUN: %clang -target x86_64-apple-macosx10.9 %s -c -emit-llvm -o /dev/null \
+// RUN:     -fprofile-instr-use=%t.profdata -Rpass=inline \
+// RUN:     -Rpass-analysis=inline -Rpass-missed=inline \
+// RUN:     -fdiagnostics-show-hotness -Xclang -verify
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name \
+// RUN:     optimization-remark-with-hotness.c %s -emit-llvm-only \
+// RUN:     -fprofile-sample-use=%t-sample.profdata -Rpass=inline \
+// RUN:     -Rpass-analysis=inline -Rpass-missed=inline \
+// RUN:     -fdiagnostics-show-hotness -fdiagnostics-hotness-threshold=10 \
+// RUN:     -verify
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name \
+// RUN:     optimization-remark-with-hotness.c %s -emit-llvm-only \
+// RUN:     -fprofile-instrument-use-path=%t.profdata -Rpass=inline \
+// RUN:     -Rpass-analysis=inline -Rpass-missed=inline \
+// RUN:     -fdiagnostics-show-hotness -fdiagnostics-hotness-threshold=10 -verify
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name \
+// RUN:     optimization-remark-with-hotness.c %s -emit-llvm-only \
+// RUN:     -fprofile-instrument-use-path=%t.profdata -Rpass=inline \
+// RUN:     -Rpass-analysis=inline 2>&1 | FileCheck -check-prefix=HOTNESS_OFF %s
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name \
+// RUN:     optimization-remark-with-hotness.c %s -emit-llvm-only \
+// RUN:     -fprofile-instrument-use-path=%t.profdata -Rpass=inline \
+// RUN:     -Rpass-analysis=inline -Rno-pass-with-hotness 2>&1 | FileCheck \
+// RUN:     -check-prefix=HOTNESS_OFF %s
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name \
+// RUN:     optimization-remark-with-hotness.c %s -emit-llvm-only \
+// RUN:     -fprofile-instrument-use-path=%t.profdata -Rpass=inline \
+// RUN:     -Rpass-analysis=inline -fdiagnostics-show-hotness \
+// RUN:     -fdiagnostics-hotness-threshold=100 2>&1 \
+// RUN:     | FileCheck -allow-empty -check-prefix=THRESHOLD %s
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name \
+// RUN:     optimization-remark-with-hotness.c %s -emit-llvm-only \
+// RUN:     -Rpass=inline -Rpass-analysis=inline \
+// RUN:     -fdiagnostics-show-hotness -fdiagnostics-hotness-threshold=10 2>&1 \
+// RUN:     | FileCheck -check-prefix=NO_PGO %s
+
+int foo(int x, int y) __attribute__((always_inline));
+int foo(int x, int y) { return x + y; }
+
+int sum = 0;
+
+void bar(int x) {
+  // HOTNESS_OFF: foo inlined into bar
+  // HOTNESS_OFF-NOT: hotness:
+  // THRESHOLD-NOT: inlined
+  // THRESHOLD-NOT: hotness
+  // NO_PGO: '-fdiagnostics-show-hotness' requires profile-guided optimization information
+  // NO_PGO: '-fdiagnostics-hotness-threshold=' requires profile-guided optimization information
+  // expected-remark@+1 {{foo inlined into bar with cost=always (hotness:}}
+  sum += foo(x, x - 2);
+}
+
+int main(int argc, const char *argv[]) {
+  for (int i = 0; i < 30; i++)
+    // expected-remark@+1 {{bar not inlined into main because it should never be inlined (cost=never) (hotness:}}
+    bar(argc);
+  return sum;
+}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/optimization-remark.c b/src/third_party/llvm-project/clang/test/Frontend/optimization-remark.c
new file mode 100644
index 0000000..29eaa03
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/optimization-remark.c
@@ -0,0 +1,49 @@
+// This file tests the -Rpass family of flags (-Rpass, -Rpass-missed
+// and -Rpass-analysis) with the inliner. The test is designed to
+// always trigger the inliner, so it should be independent of the
+// optimization level.
+
+// RUN: %clang_cc1 %s -Rpass=inline -Rpass-analysis=inline -Rpass-missed=inline -O0 -emit-llvm-only -verify
+// RUN: %clang_cc1 %s -Rpass=inline -Rpass-analysis=inline -Rpass-missed=inline -O0 -emit-llvm-only -debug-info-kind=line-tables-only -verify
+// RUN: %clang_cc1 %s -Rpass=inline -emit-llvm -o - 2>/dev/null | FileCheck %s
+//
+// Check that we can override -Rpass= with -Rno-pass.
+// RUN: %clang_cc1 %s -Rpass=inline -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK-REMARKS
+// RUN: %clang_cc1 %s -Rpass=inline -Rno-pass -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK-NO-REMARKS
+// RUN: %clang_cc1 %s -Rpass=inline -Rno-everything -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK-NO-REMARKS
+// RUN: %clang_cc1 %s -Rpass=inline -Rno-everything -Reverything -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK-REMARKS
+//
+// FIXME: -Reverything should imply -Rpass=.*.
+// RUN: %clang_cc1 %s -Reverything -emit-llvm -o - 2>/dev/null | FileCheck %s --check-prefix=CHECK-NO-REMARKS
+//
+// FIXME: -Rpass should either imply -Rpass=.* or should be rejected.
+// RUN: %clang_cc1 %s -Rpass -emit-llvm -o - 2>/dev/null | FileCheck %s --check-prefix=CHECK-NO-REMARKS
+
+// CHECK-REMARKS: remark:
+// CHECK-NO-REMARKS-NOT: remark:
+
+// -Rpass should produce source location annotations, exclusively (just
+// like -gmlt).
+// CHECK: , !dbg !
+// CHECK-NOT: DW_TAG_base_type
+
+// The CU should be marked NoDebug (to prevent writing debug info to
+// the final output).
+// CHECK: !llvm.dbg.cu = !{![[CU:.*]]}
+// CHECK: ![[CU]] = distinct !DICompileUnit({{.*}}emissionKind: NoDebug
+
+int foo(int x, int y) __attribute__((always_inline));
+int foo(int x, int y) { return x + y; }
+
+float foz(int x, int y) __attribute__((noinline));
+float foz(int x, int y) { return x * y; }
+
+// The negative diagnostics are emitted twice because the inliner runs
+// twice.
+//
+int bar(int j) {
+// expected-remark@+3 {{foz not inlined into bar because it should never be inlined (cost=never)}}
+// expected-remark@+2 {{foz not inlined into bar because it should never be inlined (cost=never)}}
+// expected-remark@+1 {{foo inlined into bar}}
+  return foo(j, j - 2) * foz(j - 2, j);
+}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/output-failures.c b/src/third_party/llvm-project/clang/test/Frontend/output-failures.c
new file mode 100644
index 0000000..362deb5
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/output-failures.c
@@ -0,0 +1,4 @@
+// RUN: not %clang_cc1 -emit-llvm -o %S/doesnotexist/somename %s 2> %t
+// RUN: FileCheck -check-prefix=OUTPUTFAIL -input-file=%t %s
+
+// OUTPUTFAIL: error: unable to open output file '{{.*}}{{[/\\]}}test{{[/\\]}}Frontend{{[/\\]}}doesnotexist{{[/\\]}}somename': '{{[nN]}}o such file or directory'
diff --git a/src/third_party/llvm-project/clang/test/Frontend/plugin-annotate-functions.c b/src/third_party/llvm-project/clang/test/Frontend/plugin-annotate-functions.c
new file mode 100644
index 0000000..b8baf7c
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/plugin-annotate-functions.c
@@ -0,0 +1,25 @@
+// RUN: %clang -fplugin=%llvmshlibdir/AnnotateFunctions%pluginext -emit-llvm -DPRAGMA_ON -S %s -o - | FileCheck %s --check-prefix=PRAGMA
+// RUN: %clang -fplugin=%llvmshlibdir/AnnotateFunctions%pluginext -emit-llvm -S %s -o - | FileCheck %s --check-prefix=NOPRAGMA
+// RUN: not %clang -fplugin=%llvmshlibdir/AnnotateFunctions%pluginext -emit-llvm -DBAD_PRAGMA -S %s -o - 2>&1 | FileCheck %s --check-prefix=BADPRAGMA
+// REQUIRES: plugins, examples
+
+#ifdef PRAGMA_ON
+#pragma enable_annotate
+#endif
+
+// BADPRAGMA: warning: extra tokens at end of #pragma directive
+#ifdef BAD_PRAGMA
+#pragma enable_annotate something
+#endif
+
+// PRAGMA: [[STR_VAR:@.+]] = private unnamed_addr constant [19 x i8] c"example_annotation\00"
+// PRAGMA: @llvm.global.annotations = {{.*}}@fn1{{.*}}[[STR_VAR]]{{.*}}@fn2{{.*}}[[STR_VAR]]
+// NOPRAGMA-NOT: [[STR_VAR:@.+]] = private unnamed_addr constant [19 x i8] c"example_annotation\00"
+// NOPRAGMA-NOT: @llvm.global.annotations = {{.*}}@fn1{{.*}}[[STR_VAR]]{{.*}}@fn2{{.*}}[[STR_VAR]]
+void fn1() { }
+void fn2() { }
+
+// BADPRAGMA: error: #pragma enable_annotate not allowed after declarations
+#ifdef BAD_PRAGMA
+#pragma enable_annotate
+#endif
diff --git a/src/third_party/llvm-project/clang/test/Frontend/plugin-delayed-template.cpp b/src/third_party/llvm-project/clang/test/Frontend/plugin-delayed-template.cpp
new file mode 100644
index 0000000..c57ec30
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/plugin-delayed-template.cpp
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -fdelayed-template-parsing -load %llvmshlibdir/PrintFunctionNames%pluginext -plugin print-fns -plugin-arg-print-fns -parse-template -plugin-arg-print-fns ForcedTemplate %s 2>&1 | FileCheck %s
+// REQUIRES: plugins, examples
+
+template <typename T>
+void TemplateDep();
+
+// CHECK: top-level-decl: "ForcedTemplate"
+// The plugin should force parsing of this template, even though it's
+// not used and -fdelayed-template-parsing is specified.
+// CHECK: warning: expression result unused
+// CHECK: late-parsed-decl: "ForcedTemplate"
+template <typename T>
+void ForcedTemplate() {
+  TemplateDep<T>();  // Shouldn't crash.
+
+  "";  // Triggers the warning checked for above.
+}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/plugin-vs-debug-info.cpp b/src/third_party/llvm-project/clang/test/Frontend/plugin-vs-debug-info.cpp
new file mode 100644
index 0000000..27631e5
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/plugin-vs-debug-info.cpp
@@ -0,0 +1,32 @@
+// This test uses PrintFunctionNames with -fdelayed-template-parsing because it
+// happens to use a RecursiveASTVisitor that forces deserialization of AST
+// files.
+//
+// RUN: %clang_cc1 -triple %itanium_abi_triple -fdelayed-template-parsing \
+// RUN:      -std=c++14 -emit-pch -o %t.pch %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple \
+// RUN:     -load %llvmshlibdir/PrintFunctionNames%pluginext \
+// RUN:     -add-plugin print-fns -std=c++14 -include-pch %t.pch %s -emit-llvm \
+// RUN:     -fdelayed-template-parsing -debug-info-kind=limited \
+// RUN:     -o %t.ll 2>&1 | FileCheck --check-prefix=DECLS %s
+// RUN: FileCheck --check-prefix=IR %s < %t.ll
+//
+// REQUIRES: plugins, examples
+
+// DECLS: top-level-decl: "func"
+
+// IR: define {{.*}}void @_Z4funcv()
+
+#ifndef HEADER
+#define HEADER
+
+struct nullopt_t {
+  constexpr explicit nullopt_t(int) {}
+};
+constexpr nullopt_t nullopt(0);
+
+#else
+
+void func() { }
+
+#endif
diff --git a/src/third_party/llvm-project/clang/test/Frontend/plugins.c b/src/third_party/llvm-project/clang/test/Frontend/plugins.c
new file mode 100644
index 0000000..8117f72
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/plugins.c
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -load %llvmshlibdir/PrintFunctionNames%pluginext -plugin print-fns %s 2>&1 | FileCheck %s
+// REQUIRES: plugins, examples
+
+// CHECK: top-level-decl: "x"
+void x();
diff --git a/src/third_party/llvm-project/clang/test/Frontend/pp-only-no-editor-placeholders.c b/src/third_party/llvm-project/clang/test/Frontend/pp-only-no-editor-placeholders.c
new file mode 100644
index 0000000..515d989
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/pp-only-no-editor-placeholders.c
@@ -0,0 +1,4 @@
+// RUN: %clang_cc1 -E -verify -o - %s | FileCheck %s
+// expected-no-diagnostics
+
+<#placeholder#>; // CHECK: <#placeholder#>;
diff --git a/src/third_party/llvm-project/clang/test/Frontend/preprocessed-input.i b/src/third_party/llvm-project/clang/test/Frontend/preprocessed-input.i
new file mode 100644
index 0000000..9d5867e
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/preprocessed-input.i
@@ -0,0 +1,10 @@
+# 1 "preprocessed-input.c"
+# 1 "<built-in>" 1
+# 1 "<built-in>" 3
+# 318 "<built-in>" 3
+# 1 "<command line>" 1
+# 1 "<built-in>" 2
+# 1 "preprocessed-input.c" 2
+
+// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s
+// CHECK: source_filename = "preprocessed-input.c"{{$}}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/preprocessed-output-macro-first-token.c b/src/third_party/llvm-project/clang/test/Frontend/preprocessed-output-macro-first-token.c
new file mode 100644
index 0000000..06b78c2
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/preprocessed-output-macro-first-token.c
@@ -0,0 +1,5 @@
+// This is the first thing other than comments and preprocessor stuff in the
+// file.
+//
+// RUN: %clang_cc1 -fms-extensions -E %s
+#pragma comment(lib, "somelib")
diff --git a/src/third_party/llvm-project/clang/test/Frontend/print-header-includes.c b/src/third_party/llvm-project/clang/test/Frontend/print-header-includes.c
new file mode 100644
index 0000000..7da56e2
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/print-header-includes.c
@@ -0,0 +1,32 @@
+// RUN: %clang_cc1 -I%S -include Inputs/test3.h -E -H -o /dev/null %s 2> %t.stderr
+// RUN: FileCheck < %t.stderr %s
+
+// CHECK-NOT: test3.h
+// CHECK: . {{.*test.h}}
+// CHECK: .. {{.*test2.h}}
+
+// RUN: %clang_cc1 -I%S -include Inputs/test3.h --show-includes -o /dev/null %s | \
+// RUN:     FileCheck --strict-whitespace --check-prefix=MS-STDOUT %s
+// MS-STDOUT-NOT: <command line>
+// MS-STDOUT: Note: including file: {{[^ ]*test3.h}}
+// MS-STDOUT: Note: including file: {{[^ ]*test.h}}
+// MS-STDOUT: Note: including file:  {{[^ ]*test2.h}}
+// MS-STDOUT-NOT: Note
+
+// RUN: %clang_cc1 -I%S -include Inputs/test3.h -E --show-includes -o /dev/null %s 2> %t.stderr
+// RUN: FileCheck --strict-whitespace --check-prefix=MS-STDERR < %t.stderr %s
+// MS-STDERR-NOT: <command line>
+// MS-STDERR: Note: including file: {{[^ ]*test3.h}}
+// MS-STDERR: Note: including file: {{[^ ]*test.h}}
+// MS-STDERR: Note: including file:  {{[^ ]*test2.h}}
+// MS-STDERR-NOT: Note
+
+// RUN: echo "fun:foo" > %t.blacklist
+// RUN: %clang_cc1 -I%S -fsanitize=address -fdepfile-entry=%t.blacklist --show-includes -o /dev/null %s | \
+// RUN:     FileCheck --strict-whitespace --check-prefix=MS-BLACKLIST %s
+// MS-BLACKLIST: Note: including file: {{[^ ]*\.blacklist}}
+// MS-BLACKLIST: Note: including file: {{[^ ]*test.h}}
+// MS-BLACKLIST: Note: including file:  {{[^ ]*test2.h}}
+// MS-BLACKLIST-NOT: Note
+
+#include "Inputs/test.h"
diff --git a/src/third_party/llvm-project/clang/test/Frontend/profile-sample-use-loc-tracking.c b/src/third_party/llvm-project/clang/test/Frontend/profile-sample-use-loc-tracking.c
new file mode 100644
index 0000000..6d722c2
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/profile-sample-use-loc-tracking.c
@@ -0,0 +1,20 @@
+// This file tests that -fprofile-sample-use enables location tracking
+// generation in the same way that -Rpass does. The sample profiler needs
+// to associate line locations in the profile to the code, so it needs the
+// frontend to emit source location annotations.
+
+// RUN: %clang_cc1 %s -fprofile-sample-use=%S/Inputs/profile-sample-use-loc-tracking.prof -emit-llvm -o - 2>/dev/null | FileCheck %s
+
+// -fprofile-sample-use should produce source location annotations, exclusively
+// (just like -gmlt).
+// CHECK: , !dbg !
+// CHECK-NOT: DW_TAG_base_type
+
+// The CU should be marked NoDebug (to prevent writing debug info to
+// the final output).
+// CHECK: !llvm.dbg.cu = !{![[CU:.*]]}
+// CHECK: ![[CU]] = distinct !DICompileUnit({{.*}}emissionKind: NoDebug
+
+int bar(int j) {
+  return (j + j - 2) * (j - 2) * j;
+}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/region-pragmas.c b/src/third_party/llvm-project/clang/test/Frontend/region-pragmas.c
new file mode 100644
index 0000000..8d929e8
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/region-pragmas.c
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -Wall -verify %s
+// expected-no-diagnostics
+
+#pragma region foo
+#pragma endregion foo
diff --git a/src/third_party/llvm-project/clang/test/Frontend/remove-file-on-signal.c b/src/third_party/llvm-project/clang/test/Frontend/remove-file-on-signal.c
new file mode 100644
index 0000000..95d9b10
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/remove-file-on-signal.c
@@ -0,0 +1,7 @@
+// RUN: rm -rf %t && mkdir -p %t && cd %t
+// RUN: not --crash %clang_cc1 %s -emit-llvm -o foo.ll
+// RUN: ls . | FileCheck %s --allow-empty
+// CHECK-NOT: foo.ll
+
+#pragma clang __debug crash
+FOO
diff --git a/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-bom.c b/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-bom.c
new file mode 100644
index 0000000..caa431a
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-bom.c
@@ -0,0 +1,8 @@
+// RUN: grep -q $'^\xEF\xBB\xBF' %S/Inputs/rewrite-includes-bom.h
+// RUN: %clang_cc1 -E -frewrite-includes -I %S/Inputs %s -o %t.c
+// RUN: ! grep -q $'\xEF\xBB\xBF' %t.c
+// RUN: %clang_cc1 -fsyntax-only -verify %t.c
+// expected-no-diagnostics
+// REQUIRES: shell
+
+#include "rewrite-includes-bom.h"
diff --git a/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-cli-include.c b/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-cli-include.c
new file mode 100644
index 0000000..ba96039
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-cli-include.c
@@ -0,0 +1,9 @@
+// RUN: not %clang_cc1 -verify -E -frewrite-includes -include %S/Inputs/rewrite-includes2.h %s -o - | FileCheck -strict-whitespace %s
+main_file_line
+// CHECK: {{^}}# 1 "<built-in>"{{$}}
+// CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes2.h" 1{{$}}
+// CHECK-NEXT: {{^}}included_line2{{$}}
+// CHECK-NEXT: {{^}}# 1 "<built-in>" 2{{$}}
+// CHECK-NEXT: {{^}}# 1 "{{.*}}rewrite-includes-cli-include.c"{{$}}
+// CHECK-NEXT: FileCheck
+// CHECK-NEXT: {{^}}main_file_line{{$}}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-eof.c b/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-eof.c
new file mode 100644
index 0000000..af7fd89
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-eof.c
@@ -0,0 +1,4 @@
+// RUN: %clang_cc1 -E -frewrite-includes -I %S/Inputs %s
+// expected-no-diagnostics
+// Note: there's no newline at the end of this C file.
+#include "rewrite-includes-bom.h"
\ No newline at end of file
diff --git a/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-filenotfound.c b/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-filenotfound.c
new file mode 100644
index 0000000..203dbde
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-filenotfound.c
@@ -0,0 +1,6 @@
+// RUN: not %clang_cc1 -E -frewrite-includes %s -o - 2>&1 | FileCheck %s
+
+#include "this file does not exist.foo"
+#include "this file also does not exist.foo"
+
+CHECK: fatal error: {{.*}} file not found
diff --git a/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-header-cmd-line.c b/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-header-cmd-line.c
new file mode 100644
index 0000000..dffaf28
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-header-cmd-line.c
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -E -frewrite-includes -include rewrite-includes2.h -I %S/Inputs %s -o - | FileCheck -strict-whitespace %s
+
+// STARTMAIN
+
+// CHECK-NOT: {{^}}#define
+// CHECK: included_line2
+// CHECK: {{^}}// STARTMAIN{{$}}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-invalid-hasinclude.c b/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-invalid-hasinclude.c
new file mode 100644
index 0000000..334519a
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-invalid-hasinclude.c
@@ -0,0 +1,17 @@
+// RUN: not %clang_cc1 -E -frewrite-includes -DFIRST -I %S/Inputs %s -o - | FileCheck -strict-whitespace %s
+
+#if __has_include bar.h
+#endif
+
+#if __has_include(bar.h)
+#endif
+
+#if __has_include(<bar.h)
+#endif
+
+// CHECK: #if __has_include bar.h
+// CHECK: #endif
+// CHECK: #if __has_include(bar.h)
+// CHECK: #endif
+// CHECK: #if __has_include(<bar.h)
+// CHECK: #endif
diff --git a/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-line-markers.c b/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-line-markers.c
new file mode 100644
index 0000000..f5fb627
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-line-markers.c
@@ -0,0 +1,30 @@
+// RUN: %clang_cc1 -E -frewrite-includes -I %S/Inputs %s | FileCheck %s --check-prefix=GNU
+// RUN: %clang_cc1 -E -frewrite-includes -fuse-line-directives -I %S/Inputs %s | FileCheck %s --check-prefix=LINE
+#include "test.h"
+int f() { return x; }
+
+#include "empty.h"
+
+// GNU: {{^}}# 1 "{{.*}}rewrite-includes-line-markers.c"
+// GNU: {{^}}#include "test.h"
+// GNU: {{^}}# 1 "{{.*}}test.h"
+// GNU: {{^}}#include "test2.h"
+// GNU: {{^}}# 1 "{{.*}}test2.h"
+// GNU: {{^}}int x;
+// GNU: {{^}}# 4 "{{.*}}rewrite-includes-line-markers.c" 2
+// GNU: {{^}}int f() { return x; }
+// GNU: {{^}}
+// GNU: {{^}}# 1 "{{.*}}empty.h" 1
+// GNU: {{^}}# 7 "{{.*}}rewrite-includes-line-markers.c" 2
+
+// LINE: {{^}}#line 1 "{{.*}}rewrite-includes-line-markers.c"
+// LINE: {{^}}#include "test.h"
+// LINE: {{^}}#line 1 "{{.*}}test.h"
+// LINE: {{^}}#include "test2.h"
+// LINE: {{^}}#line 1 "{{.*}}test2.h"
+// LINE: {{^}}int x;
+// LINE: {{^}}#line 4 "{{.*}}rewrite-includes-line-markers.c"
+// LINE: {{^}}int f() { return x; }
+// LINE: {{^}}
+// LINE: {{^}}#line 1 "{{.*}}empty.h"
+// LINE: {{^}}#line 7 "{{.*}}rewrite-includes-line-markers.c"
diff --git a/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-messages.c b/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-messages.c
new file mode 100644
index 0000000..a3a5cb2
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-messages.c
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -E -frewrite-includes %s -I%S/Inputs/ | %clang_cc1 -Wall -fsyntax-only -Wunused-macros -x c - 2>&1 > %t.1
+// RUN: %clang_cc1 -I%S/Inputs/ -Wall -Wunused-macros -fsyntax-only %s 2>&1 > %t.2
+// RUN: diff -u %t.1 %t.2
+// expected-no-diagnostics
+
+#include "rewrite-includes-messages.h"
+#define UNUSED_MACRO
diff --git a/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-missing.c b/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-missing.c
new file mode 100644
index 0000000..25a59a0
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-missing.c
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 -verify -E -frewrite-includes %s -o - | FileCheck -strict-whitespace %s
+
+#include "foobar.h" // expected-error {{'foobar.h' file not found}}
+// CHECK: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}#include "foobar.h"
+// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}# 3 "{{.*}}rewrite-includes-missing.c"{{$}}
+// CHECK-NEXT: {{^}}# 4 "{{.*}}rewrite-includes-missing.c"{{$}}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-modules.c b/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-modules.c
new file mode 100644
index 0000000..e70fe0d
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-modules.c
@@ -0,0 +1,27 @@
+// RUN: rm -rf %t
+// RUN: mkdir %t
+// RUN: echo 'extern int dummy;' > %t/dummy.h
+// RUN: echo 'module dummy { header "dummy.h" }' > %t/module.modulemap
+// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t %s -I%t -E -frewrite-includes -o - | FileCheck %s
+// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x objective-c %s -I%t -E -frewrite-includes -o - | FileCheck %s
+// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x c++ %s -I%t -E -frewrite-includes -o - | FileCheck %s
+
+int bar();
+#include "dummy.h"
+int foo();
+#include "dummy.h"
+
+// CHECK: int bar();{{$}}
+// CHECK-NEXT: #if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: #include "dummy.h"{{$}}
+// CHECK-NEXT: #endif /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: # 10 "{{.*[/\\]}}rewrite-includes-modules.c"{{$}}
+// CHECK-NEXT: #pragma clang module import dummy /* clang -frewrite-includes: implicit import */{{$}}
+// CHECK-NEXT: # 11 "{{.*[/\\]}}rewrite-includes-modules.c"{{$}}
+// CHECK-NEXT: int foo();{{$}}
+// CHECK-NEXT: #if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: #include "dummy.h"{{$}}
+// CHECK-NEXT: #endif /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: # 12 "{{.*[/\\]}}rewrite-includes-modules.c"{{$}}
+// CHECK-NEXT: #pragma clang module import dummy /* clang -frewrite-includes: implicit import */{{$}}
+// CHECK-NEXT: # 13 "{{.*[/\\]}}rewrite-includes-modules.c"{{$}}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-warnings.c b/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-warnings.c
new file mode 100644
index 0000000..1fb98db
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes-warnings.c
@@ -0,0 +1,4 @@
+// RUN: %clang_cc1 -verify -Wall -Wextra -E -frewrite-includes %s
+// expected-no-diagnostics
+
+#pragma GCC visibility push (default)
diff --git a/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes.c b/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes.c
new file mode 100644
index 0000000..630e761
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/rewrite-includes.c
@@ -0,0 +1,210 @@
+// RUN: not %clang_cc1 -verify -E -frewrite-includes -DFIRST -I %S/Inputs -I %S/Inputs/NextIncludes %s -o - | FileCheck -strict-whitespace %s
+// RUN: not %clang_cc1 -verify -E -frewrite-includes -P -DFIRST -I %S/Inputs -I %S/Inputs/NextIncludes %s -o - | FileCheck -check-prefix=CHECKNL -strict-whitespace %s
+// STARTCOMPARE
+#define A(a,b) a ## b
+A(1,2)
+#include "rewrite-includes1.h"
+#ifdef FIRST
+#define HEADER "rewrite-includes3.h"
+#include HEADER
+#else
+#include "rewrite-includes4.h"
+#endif
+  // indented
+#/**/include /**/ "rewrite-includes5.h" /**/ \
+ 
+#include "rewrite-includes6.h" // comment
+ 
+#include "rewrite-includes6.h" /* comment
+                                  continues */
+#include "rewrite-includes7.h"
+#include "rewrite-includes7.h"
+#include "rewrite-includes8.h"
+#include "rewrite-includes9.h"
+// ENDCOMPARE
+// CHECK: {{^}}# 1 "{{.*}}rewrite-includes.c"{{$}}
+// CHECK: {{^}}// STARTCOMPARE{{$}}
+// CHECK-NEXT: {{^}}#define A(a,b) a ## b{{$}}
+// CHECK-NEXT: {{^}}A(1,2){{$}}
+// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}#include "rewrite-includes1.h"{{$}}
+// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}# 6 "{{.*}}rewrite-includes.c"{{$}}
+// CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes1.h" 1{{$}}
+// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}#pragma clang system_header{{$}}
+// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}# 2 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes1.h" 3{{$}}
+// CHECK-NEXT: {{^}}included_line1{{$}}
+// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}#include "rewrite-includes2.h"{{$}}
+// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}# 3 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes1.h" 3{{$}}
+// CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes2.h" 1 3{{$}}
+// CHECK-NEXT: {{^}}included_line2{{$}}
+// CHECK-NEXT: {{^}}# 4 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes1.h" 2 3{{$}}
+// CHECK-NEXT: {{^}}# 7 "{{.*}}rewrite-includes.c" 2{{$}}
+// CHECK-NEXT: {{^}}#ifdef FIRST{{$}}
+// CHECK-NEXT: {{^}}#define HEADER "rewrite-includes3.h"{{$}}
+// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}#include HEADER{{$}}
+// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}# 9 "{{.*}}rewrite-includes.c"{{$}}
+// CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes3.h" 1{{$}}
+// CHECK-NEXT: {{^}}included_line3{{$}}
+// CHECK-NEXT: {{^}}# 10 "{{.*}}rewrite-includes.c" 2{{$}}
+// CHECK-NEXT: {{^}}#else{{$}}
+// CHECK-NEXT: {{^}}# 11 "{{.*}}rewrite-includes.c"{{$}}
+// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}#include "rewrite-includes4.h"{{$}}
+// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}# 11 "{{.*}}rewrite-includes.c"{{$}}
+// CHECK-NEXT: {{^}}# 12 "{{.*}}rewrite-includes.c"{{$}}
+// CHECK-NEXT: {{^}}#endif{{$}}
+// CHECK-NEXT: {{^}}# 13 "{{.*}}rewrite-includes.c"{{$}}
+// CHECK-NEXT: {{^}}  // indented{{$}}
+// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}#/**/include /**/ "rewrite-includes5.h" /**/ {{\\}}{{$}}
+// CHECK-NEXT: {{^}} {{$}}
+// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}# 15 "{{.*}}rewrite-includes.c"{{$}}
+// CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes5.h" 1{{$}}
+// CHECK-NEXT: {{^}}included_line5{{$}}
+// CHECK-NEXT: {{^}}# 16 "{{.*}}rewrite-includes.c" 2{{$}}
+// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}#include "rewrite-includes6.h" // comment{{$}}
+// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}# 16 "{{.*}}rewrite-includes.c"{{$}}
+// CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes6.h" 1{{$}}
+// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}#pragma once{{$}}
+// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}# 2 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes6.h"{{$}}
+// CHECK-NEXT: {{^}}included_line6{{$}}
+// CHECK-NEXT: {{^}}# 17 "{{.*}}rewrite-includes.c" 2{{$}}
+// CHECK-NEXT: {{^}} {{$}}
+// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}#include "rewrite-includes6.h" /* comment{{$}}
+// CHECK-NEXT: {{^}}                                  continues */{{$}}
+// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}# 19 "{{.*}}rewrite-includes.c"{{$}}
+// CHECK-NEXT: {{^}}# 20 "{{.*}}rewrite-includes.c"{{$}}
+// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}#include "rewrite-includes7.h"{{$}}
+// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}# 20 "{{.*}}rewrite-includes.c"{{$}}
+// CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes7.h" 1{{$}}
+// CHECK-NEXT: {{^}}#ifndef REWRITE_INCLUDES_7{{$}}
+// CHECK-NEXT: {{^}}#define REWRITE_INCLUDES_7{{$}}
+// CHECK-NEXT: {{^}}included_line7{{$}}
+// CHECK-NEXT: {{^}}#endif{{$}}
+// CHECK-NEXT: {{^}}# 5 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes7.h"{{$}}
+// CHECK-NEXT: {{^}}# 21 "{{.*}}rewrite-includes.c" 2{{$}}
+// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}#include "rewrite-includes7.h"{{$}}
+// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}# 21 "{{.*}}rewrite-includes.c"{{$}}
+// CHECK-NEXT: {{^}}# 22 "{{.*}}rewrite-includes.c"{{$}}
+// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}#include "rewrite-includes8.h"{{$}}
+// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}# 22 "{{.*}}rewrite-includes.c"{{$}}
+// CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes8.h" 1{{$}}
+// CHECK-NEXT: {{^}}#if (0)/*__has_include_next(<rewrite-includes8.h>)*/{{$}}
+// CHECK-NEXT: {{^}}#elif (0)/*__has_include(<rewrite-includes8.hfail>)*/{{$}}
+// CHECK-NEXT: {{^}}# 3 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes8.h"{{$}}
+// CHECK-NEXT: {{^}}#endif{{$}}
+// CHECK-NEXT: {{^}}# 4 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes8.h"{{$}}
+// CHECK-NEXT: {{^}}#if !(1)/*__has_include("rewrite-includes8.h")*/{{$}}
+// CHECK-NEXT: {{^}}#endif{{$}}
+// CHECK-NEXT: {{^}}# 6 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes8.h"{{$}}
+// CHECK-NEXT: {{^}}# 23 "{{.*}}rewrite-includes.c" 2{{$}}
+// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}#include "rewrite-includes9.h"{{$}}
+// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}# 23 "{{.*}}rewrite-includes.c"{{$}}
+// CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes9.h" 1{{$}}
+// CHECK-NEXT: {{^}}#if (1)/*__has_include_next(<rewrite-includes9.h>)*/{{$}}
+// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}#include_next <rewrite-includes9.h>{{$}}
+// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}# 2 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes9.h"{{$}}
+// CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)NextIncludes(/|\\\\)}}rewrite-includes9.h" 1{{$}}
+// CHECK-NEXT: {{^}}included_line9{{$}}
+// CHECK-NEXT: {{^}}# 3 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes9.h" 2{{$}}
+// CHECK-NEXT: {{^}}#endif{{$}}
+// CHECK-NEXT: {{^}}# 4 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes9.h"{{$}}
+// CHECK-NEXT: {{^}}# 24 "{{.*}}rewrite-includes.c" 2{{$}}
+// CHECK-NEXT: {{^}}// ENDCOMPARE{{$}}
+
+// CHECKNL: {{^}}// STARTCOMPARE{{$}}
+// CHECKNL-NEXT: {{^}}#define A(a,b) a ## b{{$}}
+// CHECKNL-NEXT: {{^}}A(1,2){{$}}
+// CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECKNL-NEXT: {{^}}#include "rewrite-includes1.h"{{$}}
+// CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECKNL-NEXT: {{^}}#pragma clang system_header{{$}}
+// CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECKNL-NEXT: {{^}}included_line1{{$}}
+// CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECKNL-NEXT: {{^}}#include "rewrite-includes2.h"{{$}}
+// CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECKNL-NEXT: {{^}}included_line2{{$}}
+// CHECKNL-NEXT: {{^}}#ifdef FIRST{{$}}
+// CHECKNL-NEXT: {{^}}#define HEADER "rewrite-includes3.h"{{$}}
+// CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECKNL-NEXT: {{^}}#include HEADER{{$}}
+// CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECKNL-NEXT: {{^}}included_line3{{$}}
+// CHECKNL-NEXT: {{^}}#else{{$}}
+// CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECKNL-NEXT: {{^}}#include "rewrite-includes4.h"{{$}}
+// CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECKNL-NEXT: {{^}}#endif{{$}}
+// CHECKNL-NEXT: {{^}}  // indented{{$}}
+// CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECKNL-NEXT: {{^}}#/**/include /**/ "rewrite-includes5.h" /**/ {{\\}}{{$}}
+// CHECKNL-NEXT: {{^}} {{$}}
+// CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECKNL-NEXT: {{^}}included_line5{{$}}
+// CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECKNL-NEXT: {{^}}#include "rewrite-includes6.h" // comment{{$}}
+// CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECKNL-NEXT: {{^}}#pragma once{{$}}
+// CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECKNL-NEXT: {{^}}included_line6{{$}}
+// CHECKNL-NEXT: {{^}} {{$}}
+// CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECKNL-NEXT: {{^}}#include "rewrite-includes6.h" /* comment{{$}}
+// CHECKNL-NEXT: {{^}}                                  continues */{{$}}
+// CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECKNL-NEXT: {{^}}#include "rewrite-includes7.h"{{$}}
+// CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECKNL-NEXT: {{^}}#ifndef REWRITE_INCLUDES_7{{$}}
+// CHECKNL-NEXT: {{^}}#define REWRITE_INCLUDES_7{{$}}
+// CHECKNL-NEXT: {{^}}included_line7{{$}}
+// CHECKNL-NEXT: {{^}}#endif{{$}}
+// CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECKNL-NEXT: {{^}}#include "rewrite-includes7.h"{{$}}
+// CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECKNL-NEXT: {{^}}#include "rewrite-includes8.h"{{$}}
+// CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECKNL-NEXT: {{^}}#if (0)/*__has_include_next(<rewrite-includes8.h>)*/{{$}}
+// CHECKNL-NEXT: {{^}}#elif (0)/*__has_include(<rewrite-includes8.hfail>)*/{{$}}
+// CHECKNL-NEXT: {{^}}#endif{{$}}
+// CHECKNL-NEXT: {{^}}#if !(1)/*__has_include("rewrite-includes8.h")*/{{$}}
+// CHECKNL-NEXT: {{^}}#endif{{$}}
+// CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECKNL-NEXT: {{^}}#include "rewrite-includes9.h"{{$}}
+// CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECKNL-NEXT: {{^}}#if (1)/*__has_include_next(<rewrite-includes9.h>)*/{{$}}
+// CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
+// CHECKNL-NEXT: {{^}}#include_next <rewrite-includes9.h>{{$}}
+// CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECKNL-NEXT: {{^}}included_line9{{$}}
+// CHECKNL-NEXT: {{^}}#endif{{$}}
+// CHECKNL-NEXT: {{^}}// ENDCOMPARE{{$}}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/rewrite-macros.c b/src/third_party/llvm-project/clang/test/Frontend/rewrite-macros.c
new file mode 100644
index 0000000..759afb0
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/rewrite-macros.c
@@ -0,0 +1,19 @@
+// RUN: %clang_cc1 %s -verify -rewrite-macros -o %t
+// RUN: FileCheck %s < %t
+
+// Any CHECK line comments are included in the output, so we use some extra
+// regex brackets to make sure we don't match the CHECK lines themselves.
+
+#define A(a,b) a ## b
+
+// CHECK: {{^}} 12 /*A*/ /*(1,2)*/{{$}}
+A(1,2)
+
+// CHECK: {{^}} /*_Pragma("mark")*/{{$}}
+_Pragma("mark")
+
+// CHECK: /*#warning eek*/{{$}}
+/* expected-warning {{eek}} */ #warning eek
+
+// CHECK: {{^}}//#pragma mark mark{{$}}
+#pragma mark mark
diff --git a/src/third_party/llvm-project/clang/test/Frontend/source-col-map.c b/src/third_party/llvm-project/clang/test/Frontend/source-col-map.c
new file mode 100644
index 0000000..1c80789
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/source-col-map.c
@@ -0,0 +1,39 @@
+// RUN: not %clang_cc1 -fsyntax-only -fmessage-length 75 -o /dev/null -x c < %s 2>&1 | FileCheck %s -strict-whitespace
+// REQUIRES: utf8-capable-terminal
+
+// Test case for the text diagnostics source column conversion crash.
+
+// This test case tries to check the error diagnostic message printer, which is
+// responsible to create the code snippet shorter than the message-length (in
+// number of columns.)
+//
+// The error diagnostic message printer should be able to handle the non-ascii
+// characters without any segmentation fault or assertion failure.  If your
+// changes to clang frontend crashes this case, it is likely that you are mixing
+// column index with byte index which are two totally different concepts.
+
+// NOTE: This file is encoded in UTF-8 and intentionally contains some
+// non-ASCII characters.
+
+__attribute__((format(printf, 1, 2)))
+extern int printf(const char *fmt, ...);
+
+void test1(Unknown* b);  // αααα αααα αααα αααα αααα αααα αααα αααα αααα αααα αααα
+// CHECK: unknown type name 'Unknown'
+// CHECK-NEXT: void test1(Unknown* b);  // αααα αααα αααα αααα αααα αααα αααα ααα...
+// CHECK-NEXT: {{^           \^$}}
+
+void test2(Unknown* b);  // αααα αααα αααα αααα αααα αααα αααα αααα αααα
+
+// CHECK: unknown type name 'Unknown'
+// CHECK-NEXT: void test2(Unknown* b);  // αααα αααα αααα αααα αααα αααα αααα αααα αααα
+// CHECK-NEXT: {{^           \^$}}
+
+void test3() {
+   /* αααα αααα αααα αααα αααα αααα αααα αααα αααα αααα */ printf("%d", "s");
+}
+// CHECK:       format specifies type 'int' but the argument has
+// CHECK:       type 'char *'
+// CHECK-NEXT:   ...αααα αααα αααα αααα αααα αααα αααα αααα αααα */ printf("%d", "s");
+// CHECK-NEXT: {{^                                                             ~~   \^~~$}}
+// CHECK-NEXT: {{^                                                             %s$}}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/stats-file.c b/src/third_party/llvm-project/clang/test/Frontend/stats-file.c
new file mode 100644
index 0000000..1869eb3
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/stats-file.c
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 -emit-llvm -o /dev/null -stats-file=%t %s
+// RUN: FileCheck -input-file=%t %s
+// CHECK: {
+//  ... here come some json values ...
+// CHECK: }
+
+// RUN: %clang_cc1 -emit-llvm -o %t -stats-file=%S/doesnotexist/bla %s 2>&1 | FileCheck -check-prefix=OUTPUTFAIL %s
+// OUTPUTFAIL: warning: unable to open statistics output file '{{.*}}doesnotexist{{.}}bla': '{{[Nn]}}o such file or directory'
diff --git a/src/third_party/llvm-project/clang/test/Frontend/stdin.c b/src/third_party/llvm-project/clang/test/Frontend/stdin.c
new file mode 100644
index 0000000..2d0a237
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/stdin.c
@@ -0,0 +1,3 @@
+// RUN: %clang_cc1 -E - < /dev/null > %t
+// RUN: grep '<built-in>' %t
+ 
diff --git a/src/third_party/llvm-project/clang/test/Frontend/stdlang.c b/src/third_party/llvm-project/clang/test/Frontend/stdlang.c
new file mode 100644
index 0000000..2b24c2d
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/stdlang.c
@@ -0,0 +1,21 @@
+// RUN: %clang_cc1 -x cuda -std=c++11 -DCUDA %s
+// RUN: %clang_cc1 -x cl -DOPENCL %s
+// RUN: %clang_cc1 -x cl -cl-std=cl -DOPENCL %s
+// RUN: %clang_cc1 -x cl -cl-std=cl1.1 -DOPENCL %s
+// RUN: %clang_cc1 -x cl -cl-std=cl1.2 -DOPENCL %s
+// RUN: %clang_cc1 -x cl -cl-std=cl2.0 -DOPENCL %s
+// RUN: %clang_cc1 -x cl -cl-std=c++ -DOPENCL %s
+// RUN: %clang_cc1 -x cl -cl-std=CL -DOPENCL %s
+// RUN: %clang_cc1 -x cl -cl-std=CL1.1 -DOPENCL %s
+// RUN: %clang_cc1 -x cl -cl-std=CL1.2 -DOPENCL %s
+// RUN: %clang_cc1 -x cl -cl-std=CL2.0 -DOPENCL %s
+// RUN: not %clang_cc1 -x cl -std=c99 -DOPENCL %s 2>&1 | FileCheck --check-prefix=CHECK-C99 %s
+// RUN: not %clang_cc1 -x cl -cl-std=invalid -DOPENCL %s 2>&1 | FileCheck --check-prefix=CHECK-INVALID %s
+// CHECK-C99: error: invalid argument '-std=c99' not allowed with 'OpenCL'
+// CHECK-INVALID: error: invalid value 'invalid' in '-cl-std=invalid'
+
+#if defined(CUDA)
+  __attribute__((device)) void f_device();
+#elif defined(OPENCL)
+  kernel void func(void);
+#endif
diff --git a/src/third_party/llvm-project/clang/test/Frontend/system-header-line-directive-ms-lineendings.c b/src/third_party/llvm-project/clang/test/Frontend/system-header-line-directive-ms-lineendings.c
new file mode 100644
index 0000000..57b7a27
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/system-header-line-directive-ms-lineendings.c
@@ -0,0 +1,21 @@
+// RUN: %clang_cc1 %s -E -o - -I %S/Inputs -isystem %S/Inputs/SystemHeaderPrefix | FileCheck %s

+#include <noline.h>

+#include <line-directive-in-system.h>

+

+#include "line-directive.h"

+

+// This tests that the line numbers for the current file are correctly outputted

+// for the include-file-completed test case. This file should be CRLF.

+

+// CHECK: # 1 "{{.*}}system-header-line-directive-ms-lineendings.c" 2

+// CHECK: # 1 "{{.*}}noline.h" 1 3

+// CHECK: foo();

+// CHECK: # 3 "{{.*}}system-header-line-directive-ms-lineendings.c" 2

+// CHECK: # 1 "{{.*}}line-directive-in-system.h" 1 3

+//      The "3" below indicates that "foo.h" is considered a system header.

+// CHECK: # 1 "foo.h" 3

+// CHECK: foo();

+// CHECK: # 4 "{{.*}}system-header-line-directive-ms-lineendings.c" 2

+// CHECK: # 1 "{{.*}}line-directive.h" 1

+// CHECK: # 10 "foo.h"{{$}}

+// CHECK: # 6 "{{.*}}system-header-line-directive-ms-lineendings.c" 2

diff --git a/src/third_party/llvm-project/clang/test/Frontend/system-header-line-directive.c b/src/third_party/llvm-project/clang/test/Frontend/system-header-line-directive.c
new file mode 100644
index 0000000..9d4f098
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/system-header-line-directive.c
@@ -0,0 +1,23 @@
+// RUN: %clang_cc1 -Wall %s -I %S/Inputs -isystem %S/Inputs/SystemHeaderPrefix -verify
+// RUN: %clang_cc1 %s -E -o - -I %S/Inputs -isystem %S/Inputs/SystemHeaderPrefix | FileCheck %s
+#include <noline.h>
+#include <line-directive-in-system.h>
+
+// expected-warning@line-directive.h:* {{type specifier missing, defaults to 'int'}}
+#include "line-directive.h"
+
+// This tests that "#line" directives in system headers preserve system
+// header-ness just like GNU line markers that don't have filenames.  This was
+// PR30752.
+
+// CHECK: # {{[0-9]+}} "{{.*}}system-header-line-directive.c" 2
+// CHECK: # 1 "{{.*}}noline.h" 1 3
+// CHECK: foo();
+// CHECK: # 4 "{{.*}}system-header-line-directive.c" 2
+// CHECK: # 1 "{{.*}}line-directive-in-system.h" 1 3
+//      The "3" below indicates that "foo.h" is considered a system header.
+// CHECK: # 1 "foo.h" 3
+// CHECK: foo();
+// CHECK: # {{[0-9]+}} "{{.*}}system-header-line-directive.c" 2
+// CHECK: # 1 "{{.*}}line-directive.h" 1
+// CHECK: # 10 "foo.h"{{$}}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/system-header-prefix.c b/src/third_party/llvm-project/clang/test/Frontend/system-header-prefix.c
new file mode 100644
index 0000000..55b954f
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/system-header-prefix.c
@@ -0,0 +1,12 @@
+// RUN: %clang --system-header-prefix=libs/ --no-system-header-prefix=libs/mylib/ -I%S/Inputs/SystemHeaderPrefix -Wundef -E %s 2>&1 | FileCheck %s
+// RUN: %clang --system-header-prefix libs/ --no-system-header-prefix libs/mylib/ -I%S/Inputs/SystemHeaderPrefix -Wundef -E %s 2>&1 | FileCheck %s
+
+#include "src/all.h"
+
+// CHECK-NOT: BOOST
+// CHECK: libs{{/|\\}}mylib{{/|\\}}warn.h:1:5: warning: 'MYLIB' is not defined, evaluates to 0
+// CHECK-NOT: BOOST
+// CHECK: libs{{/|\\}}mylib{{/|\\}}warn.h:1:5: warning: 'MYLIB' is not defined, evaluates to 0
+// CHECK-NOT: BOOST
+// CHECK: src{{/|\\}}warn.h:1:5: warning: 'SRC' is not defined, evaluates to 0
+// CHECK-NOT: BOOST
diff --git a/src/third_party/llvm-project/clang/test/Frontend/trigraphs.cpp b/src/third_party/llvm-project/clang/test/Frontend/trigraphs.cpp
new file mode 100644
index 0000000..5520789
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/trigraphs.cpp
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -DSTDCPP11 -std=c++11 -verify -fsyntax-only %s
+// RUN: %clang_cc1 -DSTDGNU11 -std=gnu++11 -verify -fsyntax-only %s
+// RUN: %clang_cc1 -DSTDGNU11TRI -ftrigraphs -std=gnu++11 -verify -fsyntax-only %s
+// RUN: %clang_cc1 -DSTDCPP17 -std=c++1z -verify -fsyntax-only %s
+// RUN: %clang_cc1 -DSTDCPP17TRI -ftrigraphs -std=c++1z -verify -fsyntax-only %s
+// RUN: %clang_cc1 -DMSCOMPAT -fms-compatibility -std=c++11 -verify -fsyntax-only %s
+
+void foo() {
+#if defined(NOFLAGS) || defined(STDCPP11) || defined(STDGNU11TRI) || \
+    defined(STDCPP17TRI)
+  const char c[] = "??/n"; // expected-warning{{trigraph converted to '\' character}}
+#elif defined(STDGNU11) || defined(STDCPP17) || defined(MSCOMPAT)
+  const char c[] = "??/n"; // expected-warning{{trigraph ignored}}
+#else
+#error Not handled.
+#endif
+}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/undef.c b/src/third_party/llvm-project/clang/test/Frontend/undef.c
new file mode 100644
index 0000000..f539cdc
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/undef.c
@@ -0,0 +1,4 @@
+// RUN: %clang -undef -x assembler-with-cpp -E %s
+#ifndef __ASSEMBLER__
+#error "Must be preprocessed as assembler."
+#endif
diff --git a/src/third_party/llvm-project/clang/test/Frontend/unknown-arg.c b/src/third_party/llvm-project/clang/test/Frontend/unknown-arg.c
new file mode 100644
index 0000000..00f2da6
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/unknown-arg.c
@@ -0,0 +1,9 @@
+// RUN: not %clang_cc1 %s -E --helium 2>&1 | \
+// RUN: FileCheck %s
+// RUN: not %clang_cc1 %s -E --hel[ 2>&1 | \
+// RUN: FileCheck %s --check-prefix=DID-YOU-MEAN
+// RUN: not %clang %s -E -Xclang --hel[ 2>&1 | \
+// RUN: FileCheck %s --check-prefix=DID-YOU-MEAN
+
+// CHECK: error: unknown argument: '--helium'
+// DID-YOU-MEAN: error: unknown argument '--hel[', did you mean '--help'?
diff --git a/src/third_party/llvm-project/clang/test/Frontend/unknown-pragmas.c b/src/third_party/llvm-project/clang/test/Frontend/unknown-pragmas.c
new file mode 100644
index 0000000..eea025c
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/unknown-pragmas.c
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -Eonly -Wall -verify %s
+// RUN: %clang_cc1 -E -dM -Wall -verify %s
+// expected-no-diagnostics
+
+#pragma adgohweopihweotnwet
diff --git a/src/third_party/llvm-project/clang/test/Frontend/verify-directive.h b/src/third_party/llvm-project/clang/test/Frontend/verify-directive.h
new file mode 100644
index 0000000..cb40586
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/verify-directive.h
@@ -0,0 +1,2 @@
+// Check that directives inside includes are included!
+// expected-error@1 {{include file test}}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/verify-fatal.c b/src/third_party/llvm-project/clang/test/Frontend/verify-fatal.c
new file mode 100644
index 0000000..1a26196
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/verify-fatal.c
@@ -0,0 +1,12 @@
+// RUN: not %clang_cc1 -Wfatal-errors -verify %s 2>&1 | FileCheck %s
+
+#error first fatal
+// expected-error@-1 {{first fatal}}
+
+#error second fatal
+// expected-error@-1 {{second fatal}}
+
+
+//      CHECK: error: 'error' diagnostics expected but not seen:
+// CHECK-NEXT:   Line 6 (directive at {{.*}}verify-fatal.c:7): second fatal
+// CHECK-NEXT: 1 error generated.
diff --git a/src/third_party/llvm-project/clang/test/Frontend/verify-ignore-unexpected.c b/src/third_party/llvm-project/clang/test/Frontend/verify-ignore-unexpected.c
new file mode 100644
index 0000000..bc3e0d1
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/verify-ignore-unexpected.c
@@ -0,0 +1,81 @@
+// RUN: not %clang_cc1 -DTEST_SWITCH -verify-ignore-unexpected=remark,aoeu,note -verify %s 2>&1 \
+// RUN:     | FileCheck -check-prefix=CHECK-BAD-SWITCH %s
+#ifdef TEST_SWITCH
+// expected-no-diagnostics
+#endif
+// CHECK-BAD-SWITCH: error: 'error' diagnostics seen but not expected:
+// CHECK-BAD-SWITCH-NEXT: (frontend): invalid value 'aoeu' in '-verify-ignore-unexpected='
+
+// RUN: %clang_cc1 -DTEST1 -verify %s
+// RUN: %clang_cc1 -DTEST1 -verify -verify-ignore-unexpected %s
+#ifdef TEST1
+#warning MyWarning1
+    // expected-warning@-1 {{MyWarning1}}
+int x; // expected-note {{previous definition is here}}
+float x; // expected-error {{redefinition of 'x'}}
+#endif
+
+// RUN: not %clang_cc1 -DTEST2 -verify %s 2>&1 \
+// RUN:     | FileCheck -check-prefix=CHECK-UNEXP %s
+// RUN: not %clang_cc1 -DTEST2 -verify -verify-ignore-unexpected= %s 2>&1 \
+// RUN:     | FileCheck -check-prefix=CHECK-UNEXP %s
+// RUN: not %clang_cc1 -DTEST2 -verify -verify-ignore-unexpected=note %s 2>&1 \
+// RUN:     | FileCheck -check-prefix=CHECK-NOTE %s
+// RUN: not %clang_cc1 -DTEST2 -verify -verify-ignore-unexpected=warning %s 2>&1 \
+// RUN:     | FileCheck -check-prefix=CHECK-WARN %s
+// RUN: not %clang_cc1 -DTEST2 -verify -verify-ignore-unexpected=error %s 2>&1 \
+// RUN:     | FileCheck -check-prefix=CHECK-ERR %s
+#ifdef TEST2
+#warning MyWarning2
+int x;
+float x;
+#endif
+// CHECK-UNEXP: no expected directives found
+// CHECK-UNEXP-NEXT: 'error' diagnostics seen but not expected
+// CHECK-UNEXP-NEXT: Line {{[0-9]+}}: redefinition of 'x'
+// CHECK-UNEXP-NEXT: 'warning' diagnostics seen but not expected
+// CHECK-UNEXP-NEXT: Line {{[0-9]+}}: MyWarning2
+// CHECK-UNEXP-NEXT: 'note' diagnostics seen but not expected
+// CHECK-UNEXP-NEXT: Line {{[0-9]+}}: previous definition is here
+// CHECK-UNEXP-NEXT: 4 errors generated.
+
+// CHECK-NOTE: no expected directives found
+// CHECK-NOTE-NEXT: 'error' diagnostics seen but not expected
+// CHECK-NOTE-NEXT: Line {{[0-9]+}}: redefinition of 'x'
+// CHECK-NOTE-NEXT: 'warning' diagnostics seen but not expected
+// CHECK-NOTE-NEXT: Line {{[0-9]+}}: MyWarning2
+// CHECK-NOTE-NEXT: 3 errors generated.
+
+// CHECK-WARN: no expected directives found
+// CHECK-WARN-NEXT: 'error' diagnostics seen but not expected
+// CHECK-WARN-NEXT: Line {{[0-9]+}}: redefinition of 'x'
+// CHECK-WARN-NEXT: 'note' diagnostics seen but not expected
+// CHECK-WARN-NEXT: Line {{[0-9]+}}: previous definition is here
+// CHECK-WARN-NEXT: 3 errors generated.
+
+// CHECK-ERR: no expected directives found
+// CHECK-ERR-NEXT: 'warning' diagnostics seen but not expected
+// CHECK-ERR-NEXT: Line {{[0-9]+}}: MyWarning2
+// CHECK-ERR-NEXT: 'note' diagnostics seen but not expected
+// CHECK-ERR-NEXT: Line {{[0-9]+}}: previous definition is here
+// CHECK-ERR-NEXT: 3 errors generated.
+
+// RUN: not %clang_cc1 -DTEST3 -verify -verify-ignore-unexpected %s 2>&1 \
+// RUN:     | FileCheck -check-prefix=CHECK-EXP %s
+#ifdef TEST3
+// expected-error {{test3}}
+#endif
+// CHECK-EXP: 'error' diagnostics expected but not seen
+// CHECK-EXP-NEXT: Line {{[0-9]+}}: test3
+
+// RUN: not %clang_cc1 -DTEST4 -verify -verify-ignore-unexpected %s 2>&1 \
+// RUN:     | FileCheck -check-prefix=CHECK-NOEXP %s
+// RUN: not %clang_cc1 -DTEST4 -verify -verify-ignore-unexpected=warning,error,note %s 2>&1 \
+// RUN:     | FileCheck -check-prefix=CHECK-NOEXP %s
+#ifdef TEST4
+#warning MyWarning4
+int x;
+float x;
+#endif
+// CHECK-NOEXP: error: no expected directives found
+// CHECK-NOEXP-NEXT: 1 error generated
diff --git a/src/third_party/llvm-project/clang/test/Frontend/verify-prefixes.c b/src/third_party/llvm-project/clang/test/Frontend/verify-prefixes.c
new file mode 100644
index 0000000..c5b545c
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/verify-prefixes.c
@@ -0,0 +1,118 @@
+#if GC
+# define GCONST const
+#else
+# define GCONST
+#endif
+
+// gconst-note@8 {{variable 'glb' declared const here}}
+GCONST int glb = 5;
+
+
+// Check various correct prefix spellings and combinations.
+//
+// RUN: %clang_cc1             -DGC           -verify=gconst                 %s
+// RUN: %clang_cc1 -Wcast-qual      -DLC      -verify=lconst                 %s
+// RUN: %clang_cc1                       -DSC -verify=expected               %s
+// RUN: %clang_cc1                       -DSC -verify                        %s
+// RUN: %clang_cc1                       -DSC -verify -verify                %s
+// RUN: %clang_cc1                            -verify=nconst                 %s
+// RUN: %clang_cc1                            -verify=n-const                %s
+// RUN: %clang_cc1                            -verify=n_const                %s
+// RUN: %clang_cc1                            -verify=NConst                 %s
+// RUN: %clang_cc1                            -verify=NConst2                %s
+// RUN: %clang_cc1 -Wcast-qual -DGC -DLC      -verify=gconst,lconst          %s
+// RUN: %clang_cc1 -Wcast-qual -DGC -DLC -DSC -verify=gconst,lconst,expected %s
+// RUN: %clang_cc1 -Wcast-qual -DGC -DLC      -verify=gconst -verify=lconst  %s
+// RUN: %clang_cc1 -Wcast-qual -DGC -DLC -DSC -verify=gconst,lconst -verify  %s
+// RUN: %clang_cc1             -DGC      -DSC -verify -verify=gconst -verify %s
+//
+// Duplicate prefixes.
+// RUN: %clang_cc1 -Wcast-qual -DGC -DLC      -verify=gconst,lconst,gconst         %s
+// RUN: %clang_cc1             -DGC           -verify=gconst -verify=gconst,gconst %s
+// RUN: %clang_cc1                       -DSC -verify=expected -verify=expected    %s
+// RUN: %clang_cc1                       -DSC -verify -verify=expected             %s
+//
+// Various tortured cases: multiple directives with different prefixes per
+// line, prefixes used as comments, prefixes prefixing prefixes, and prefixes
+// with special suffixes.
+// RUN: %clang_cc1 -Wcast-qual      -DLC      -verify=foo                    %s
+// RUN: %clang_cc1                       -DSC -verify=bar                    %s
+// RUN: %clang_cc1 -Wcast-qual      -DLC -DSC -verify=foo,bar                %s
+// RUN: %clang_cc1 -Wcast-qual      -DLC -DSC -verify=bar,foo                %s
+// RUN: %clang_cc1                       -DSC -verify=foo-bar                %s
+// RUN: %clang_cc1 -Wcast-qual      -DLC      -verify=bar-foo                %s
+// RUN: %clang_cc1 -Wcast-qual      -DLC -DSC -verify=foo,foo-bar            %s
+// RUN: %clang_cc1 -Wcast-qual      -DLC -DSC -verify=foo-bar,foo            %s
+// RUN: %clang_cc1 -Wcast-qual      -DLC -DSC -verify=bar,bar-foo            %s
+// RUN: %clang_cc1 -Wcast-qual      -DLC -DSC -verify=bar-foo,bar            %s
+// RUN: %clang_cc1 -Wcast-qual      -DLC -DSC -verify=foo-bar,bar-foo        %s
+// RUN: %clang_cc1                       -DSC -verify=foo-warning            %s
+// RUN: %clang_cc1 -Wcast-qual      -DLC      -verify=bar-warning-re         %s
+// RUN: %clang_cc1 -Wcast-qual      -DLC -DSC -verify=foo,foo-warning        %s
+// RUN: %clang_cc1 -Wcast-qual      -DLC -DSC -verify=foo-warning,foo        %s
+// RUN: %clang_cc1 -Wcast-qual      -DLC -DSC -verify=bar,bar-warning-re     %s
+// RUN: %clang_cc1 -Wcast-qual      -DLC -DSC -verify=bar-warning-re,bar     %s
+
+
+// Check invalid prefixes.  Check that there's no additional output, which
+// might indicate that diagnostic verification became enabled even though it
+// was requested incorrectly.  Check that prefixes are reported in command-line
+// order.
+//
+// RUN: not %clang_cc1 -verify=5abc,-xy,foo,_k -verify='#a,b$' %s 2> %t
+// RUN: FileCheck --check-prefixes=ERR %s < %t
+//
+// ERR-NOT:  {{.}}
+// ERR:      error: invalid value '5abc' in '-verify='
+// ERR-NEXT: note: -verify prefixes must start with a letter and contain only alphanumeric characters, hyphens, and underscores
+// ERR-NEXT: error: invalid value '-xy' in '-verify='
+// ERR-NEXT: note: -verify prefixes must start with a letter and contain only alphanumeric characters, hyphens, and underscores
+// ERR-NEXT: error: invalid value '_k' in '-verify='
+// ERR-NEXT: note: -verify prefixes must start with a letter and contain only alphanumeric characters, hyphens, and underscores
+// ERR-NEXT: error: invalid value '#a' in '-verify='
+// ERR-NEXT: note: -verify prefixes must start with a letter and contain only alphanumeric characters, hyphens, and underscores
+// ERR-NEXT: error: invalid value 'b$' in '-verify='
+// ERR-NEXT: note: -verify prefixes must start with a letter and contain only alphanumeric characters, hyphens, and underscores
+// ERR-NOT:  {{.}}
+
+
+// Check that our test code actually has expected diagnostics when there's no
+// -verify.
+//
+// RUN: not %clang_cc1 -Wcast-qual -DGC -DLC -DSC %s 2> %t
+// RUN: FileCheck --check-prefix=ALL %s < %t
+//
+// ALL: cannot assign to variable 'glb' with const-qualified type 'const int'
+// ALL: variable 'glb' declared const here
+// ALL: cast from 'const int *' to 'int *' drops const qualifier
+// ALL: initializing 'int *' with an expression of type 'const int *' discards qualifiers
+
+
+#if LC
+# define LCONST const
+#else
+# define LCONST
+#endif
+
+#if SC
+# define SCONST const
+#else
+# define SCONST
+#endif
+
+void foo() {
+  LCONST int loc = 5;
+  SCONST static int sta = 5;
+  // We don't actually expect 1-2 occurrences of this error.  We're just
+  // checking the parsing.
+  glb = 6; // gconst-error1-2 {{cannot assign to variable 'glb' with const-qualified type 'const int'}}
+  *(int*)(&loc) = 6; // lconst-warning {{cast from 'const int *' to 'int *' drops const qualifier}}
+  ; // Code, comments, and many directives with different prefixes per line, including cases where some prefixes (foo and bar) prefix others (such as foo-bar and bar-foo), such that some prefixes appear as normal comments and some have special suffixes (-warning and -re): foo-warning@-1 {{cast from 'const int *' to 'int *' drops const qualifier}} foo-bar-warning@+1 {{initializing 'int *' with an expression of type 'const int *' discards qualifiers}} foo-warning-warning@+1 {{initializing 'int *' with an expression of type 'const int *' discards qualifiers}} bar-warning-re-warning@-1 {{cast from 'const int *' to 'int *' drops const qualifier}} bar-foo-warning@-1 {{cast from 'const int *' to 'int *' drops const qualifier}} bar-warning@+1 {{initializing 'int *' with an expression of type 'const int *' discards qualifiers}}
+  int *p = &sta; // expected-warning {{initializing 'int *' with an expression of type 'const int *' discards qualifiers}}
+}
+
+// nconst-no-diagnostics
+// n-const-no-diagnostics
+// n_const-no-diagnostics
+// NConst-no-diagnostics
+// NConst2-no-diagnostics
diff --git a/src/third_party/llvm-project/clang/test/Frontend/verify-unknown-arg.c b/src/third_party/llvm-project/clang/test/Frontend/verify-unknown-arg.c
new file mode 100644
index 0000000..5767dae
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/verify-unknown-arg.c
@@ -0,0 +1,6 @@
+// RUN: not %clang_cc1 -asdf -verify %s 2>&1 | FileCheck %s
+
+// expected-no-diagnostics
+
+//      CHECK: error: 'error' diagnostics seen but not expected:
+// CHECK-NEXT: (frontend): unknown argument: '-asdf'
diff --git a/src/third_party/llvm-project/clang/test/Frontend/verify.c b/src/third_party/llvm-project/clang/test/Frontend/verify.c
new file mode 100644
index 0000000..e2e7894
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/verify.c
@@ -0,0 +1,151 @@
+// RUN: %clang_cc1 -DTEST1 -verify %s
+// RUN: not %clang_cc1 -DTEST2 -verify %s 2>&1 | FileCheck -check-prefix=CHECK2 %s
+// RUN: not %clang_cc1 -DTEST3 -verify %s 2>&1 | FileCheck -check-prefix=CHECK3 %s
+// RUN: not %clang_cc1 -DTEST4 -verify %s 2>&1 | FileCheck -check-prefix=CHECK4 %s
+// RUN: not %clang_cc1 -DTEST5 -verify %s 2>&1 | FileCheck -check-prefix=CHECK5 %s
+
+// expected-warning@ malformed
+// expected-error@7 1 {{missing or invalid line number}}
+
+// expected-warning@0 malformed
+// expected-error@10 {{missing or invalid line number}}
+
+// expected-warning@-50 malformed
+// expected-error@13 {{missing or invalid line number}}
+
+// expected-warning malformed
+// expected-error@16 {{cannot find start}}
+
+// expected-error 0+ {{should also be ignored}}
+
+#ifdef TEST1
+#if 0
+// expected-error {{should be ignored}}
+#endif
+// eexpected-error {{should also be ignored: unrecognised directive}}
+#error should not be ignored
+// expected-error@-1 1+ {{should not be ignored}}
+
+#line 90
+unexpected a; // expected-error@+0 + {{unknown type}}
+
+#line 60
+unexpected b; // expected-error@33 1-1 {{unknown type}}
+
+// expected-error@+2 {{file not found}} check that multi-line handled correctly: \
+
+#include "missing_header_file.include"
+#endif
+
+#ifdef TEST2
+#define MACRO some_value // expected-error {{define_error}}
+#undef MACRO extra_token // expected-warning {{undef_error}}
+#line -2                 // expected-error {{line_error}}
+#error AAA               // expected-error {{BBB}} <- this shall be part of diagnostic
+#warning CCC             // expected-warning {{DDD}} <- this shall be part of diagnostic
+
+#if 0
+// This is encapsulated in "#if 0" so that the expected-* checks below
+// are not inadvertently included in the diagnostic checking!
+
+//      CHECK2: error: 'error' diagnostics expected but not seen:
+// CHECK2-NEXT:   Line 41: define_error
+// CHECK2-NEXT:   Line 43: line_error
+// CHECK2-NEXT: error: 'error' diagnostics seen but not expected:
+// CHECK2-NEXT:   Line 43: #line directive requires a positive integer argument
+// CHECK2-NEXT:   Line 44: AAA // expected-error {{[{][{]BBB[}][}]}} <- this shall be part of diagnostic
+// CHECK2-NEXT: error: 'warning' diagnostics expected but not seen:
+// CHECK2-NEXT:   Line 42: undef_error
+// CHECK2-NEXT: error: 'warning' diagnostics seen but not expected:
+// CHECK2-NEXT:   Line 42: extra tokens at end of #undef directive
+// CHECK2-NEXT:   Line 45: CCC // expected-warning {{[{][{]DDD[}][}]}} <- this shall be part of diagnostic
+// CHECK2-NEXT: 7 errors generated.
+#endif
+#endif
+
+#ifdef TEST3
+#ifndef TEST3         // expected-note {{line_67}}
+                      // expected-note {{line_68_ignored}}
+# ifdef UNDEFINED     // expected-note {{line_69_ignored}}
+# endif               // expected-note {{line_70_ignored}}
+#elif defined(TEST3)  // expected-note {{line_71}}
+# if 1                // expected-note {{line_72}}
+                      // expected-note {{line_73}}
+# else                // expected-note {{line_74}}
+                      // expected-note {{line_75_ignored}}
+#  ifndef TEST3       // expected-note {{line_76_ignored}}
+#  endif              // expected-note {{line_77_ignored}}
+# endif               // expected-note {{line_78}}
+#endif
+
+//      CHECK3: error: 'note' diagnostics expected but not seen:
+// CHECK3-NEXT:   Line 67: line_67
+// CHECK3-NEXT:   Line 71: line_71
+// CHECK3-NEXT:   Line 72: line_72
+// CHECK3-NEXT:   Line 73: line_73
+// CHECK3-NEXT:   Line 74: line_74
+// CHECK3-NEXT:   Line 78: line_78
+// CHECK3-NEXT: 6 errors generated.
+#endif
+
+#ifdef TEST4
+#include "missing_header_file.include" // expected-error {{include_error}}
+
+//      CHECK4: error: 'error' diagnostics expected but not seen:
+// CHECK4-NEXT:   Line 92: include_error
+// CHECK4-NEXT: error: 'error' diagnostics seen but not expected:
+// CHECK4-NEXT:   Line 92: 'missing_header_file.include' file not found
+// CHECK4-NEXT: 2 errors generated.
+#endif
+
+#ifdef TEST5
+#include "verify-directive.h"
+// expected-error@50 {{source file test}}
+
+//      CHECK5: error: 'error' diagnostics expected but not seen:
+// CHECK5-NEXT:   Line 1 (directive at {{.*}}verify-directive.h:2): include file test
+// CHECK5-NEXT:   Line 50 (directive at {{.*}}verify.c:103): source file test
+// CHECK5-NEXT: 2 errors generated.
+#endif
+
+#if 0
+// RUN: not %clang_cc1 -verify %t.invalid 2>&1 | FileCheck -check-prefix=CHECK6 %s
+
+//      CHECK6: error: no expected directives found: consider use of 'expected-no-diagnostics'
+// CHECK6-NEXT: error: 'error' diagnostics seen but not expected:
+// CHECK6-NEXT:   (frontend): error reading '{{.*}}verify.c.tmp.invalid'
+// CHECK6-NEXT: 2 errors generated.
+
+// RUN: printf '//expected-error@2{{1}}\n#error 2\n' | not %clang_cc1 -verify 2>&1 | FileCheck -check-prefix=CHECK7 %s
+
+//      CHECK7: error: 'error' diagnostics expected but not seen:
+// CHECK7-NEXT:   Line 2 (directive at <stdin>:1): 1
+// CHECK7-NEXT: error: 'error' diagnostics seen but not expected:
+// CHECK7-NEXT:   Line 2: 2
+// CHECK7-NEXT: 2 errors generated.
+#endif
+
+#ifdef TEST8
+// RUN: not %clang_cc1 -DTEST8 -verify %s 2>&1 | FileCheck -check-prefix=CHECK8 %s
+
+// expected-warning@nonexistent-file:1 {{ }}
+// expected-error@-1 {{file 'nonexistent-file' could not be located}}
+
+// expected-warning@verify-directive.h: {{ }}
+// expected-error@-1 {{missing or invalid line number}}
+
+// expected-warning@verify-directive.h:0 {{ }}
+// expected-error@-1 {{missing or invalid line number}}
+
+// expected-warning@verify-directive.h:0*{{ }}
+// expected-error@-1 {{missing or invalid line number}}
+
+// expected-warning@verify-directive.h:*0{{ }}
+// syntactically ok -- means match in any line for 0 occurrences.
+
+// expected-warning@verify-directive.h:1 {{diagnostic}}
+
+//      CHECK8: error: 'warning' diagnostics expected but not seen:
+// CHECK8-NEXT:   File {{.*}}verify-directive.h Line 1 (directive at {{.*}}verify.c:146): diagnostic
+// CHECK8-NEXT: 1 error generated.
+#endif
diff --git a/src/third_party/llvm-project/clang/test/Frontend/verify2.c b/src/third_party/llvm-project/clang/test/Frontend/verify2.c
new file mode 100644
index 0000000..075a2ab
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/verify2.c
@@ -0,0 +1,39 @@
+#if 0
+// RUN: not %clang_cc1 -verify %s 2>&1 | FileCheck %s
+
+// Please note that all comments are inside "#if 0" blocks so that
+// VerifyDiagnosticConsumer sees no comments while processing this
+// test-case (and hence no expected-* directives).
+#endif
+
+#include "verify2.h"
+#error source
+
+#if 0
+// expected-error {{should be ignored}}
+
+//      CHECK: error: no expected directives found: consider use of 'expected-no-diagnostics'
+// CHECK-NEXT: error: 'error' diagnostics seen but not expected:
+// CHECK-NEXT:   Line 5: header
+// CHECK-NEXT:   Line 10: source
+// CHECK-NEXT: 3 errors generated.
+#endif
+
+#ifdef CHECK2
+// RUN: not %clang_cc1 -DCHECK2 -verify %s 2>&1 | FileCheck -check-prefix=CHECK2 %s
+
+// The following checks that -verify can match "any line" in an included file.
+// The location of the diagnostic need therefore only match in the file, not to
+// a specific line number.  This is useful where -verify is used as a testing
+// tool for 3rd-party libraries where headers may change and the specific line
+// number of a diagnostic in a header is not important.
+
+// expected-error@verify2.h:* {{header}}
+// expected-error@verify2.h:* {{unknown}}
+
+//      CHECK2: error: 'error' diagnostics expected but not seen:
+// CHECK2-NEXT:   File {{.*}}verify2.h Line * (directive at {{.*}}verify2.c:32): unknown
+// CHECK2-NEXT: error: 'error' diagnostics seen but not expected:
+// CHECK2-NEXT:   File {{.*}}verify2.c Line 10: source
+// CHECK2-NEXT: 2 errors generated.
+#endif
diff --git a/src/third_party/llvm-project/clang/test/Frontend/verify2.h b/src/third_party/llvm-project/clang/test/Frontend/verify2.h
new file mode 100644
index 0000000..a426722
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/verify2.h
@@ -0,0 +1,5 @@
+#if 0
+// expected-error {{should be ignored}}
+#endif
+
+#error header
diff --git a/src/third_party/llvm-project/clang/test/Frontend/verify3.c b/src/third_party/llvm-project/clang/test/Frontend/verify3.c
new file mode 100644
index 0000000..3898bfe
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/verify3.c
@@ -0,0 +1,41 @@
+// This test-case runs several sub-tests on -verify to ensure that correct
+// diagnostics are generated in relation to the mis-use and non-use of the
+// 'expected-no-diagnostics' directive.
+
+// RUN: not %clang_cc1 -DTEST1 -verify %s 2>&1 | FileCheck -check-prefix=CHECK1 %s
+#ifdef TEST1
+// expected-no-diagnostics
+// expected-note {{}}
+
+//      CHECK1: error: 'error' diagnostics seen but not expected:
+// CHECK1-NEXT:   Line 8: expected directive cannot follow 'expected-no-diagnostics' directive
+// CHECK1-NEXT: 1 error generated.
+#endif
+
+// RUN: not %clang_cc1 -DTEST2 -verify %s 2>&1 | FileCheck -check-prefix=CHECK2 %s
+#ifdef TEST2
+#warning X
+// expected-warning@-1 {{X}}
+// expected-no-diagnostics
+
+//      CHECK2: error: 'error' diagnostics seen but not expected:
+// CHECK2-NEXT:   Line 19: 'expected-no-diagnostics' directive cannot follow other expected directives
+// CHECK2-NEXT: 1 error generated.
+#endif
+
+// RUN: not %clang_cc1 -DTEST3 -verify %s 2>&1 | FileCheck -check-prefix=CHECK3 %s
+// RUN: not %clang_cc1 -verify %s 2>&1 | FileCheck -check-prefix=CHECK3 %s
+#ifdef TEST3
+// no directives
+
+//      CHECK3: error: no expected directives found: consider use of 'expected-no-diagnostics'
+// CHECK3-NEXT: 1 error generated.
+#endif
+
+// RUN: %clang_cc1 -E -DTEST4 -verify %s 2>&1 | FileCheck -check-prefix=CHECK4 %s
+#ifdef TEST4
+#warning X
+// expected-warning@-1 {{X}}
+
+// CHECK4-NOT: error: no expected directives found: consider use of 'expected-no-diagnostics'
+#endif
diff --git a/src/third_party/llvm-project/clang/test/Frontend/warning-mapping-1.c b/src/third_party/llvm-project/clang/test/Frontend/warning-mapping-1.c
new file mode 100644
index 0000000..623e5e3
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/warning-mapping-1.c
@@ -0,0 +1,7 @@
+// Check that -w has higher priority than -Werror.
+// RUN: %clang_cc1 -verify -Wsign-compare -Werror -w %s
+// expected-no-diagnostics
+
+int f0(int x, unsigned y) {
+  return x < y;
+}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/warning-mapping-2.c b/src/third_party/llvm-project/clang/test/Frontend/warning-mapping-2.c
new file mode 100644
index 0000000..39ba499
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/warning-mapping-2.c
@@ -0,0 +1,5 @@
+// Check that -w has lower priority than -pedantic-errors.
+// RUN: %clang_cc1 -verify -pedantic-errors -w %s
+
+void f0() { f1(); } // expected-error {{implicit declaration of function}}
+
diff --git a/src/third_party/llvm-project/clang/test/Frontend/warning-mapping-3.c b/src/third_party/llvm-project/clang/test/Frontend/warning-mapping-3.c
new file mode 100644
index 0000000..8c70190
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/warning-mapping-3.c
@@ -0,0 +1,10 @@
+// Check that -Werror and -Wfatal-error interact properly.
+//
+// Verify mode doesn't work with fatal errors, just use FileCheck here.
+//
+// RUN: not %clang_cc1 -Wunused-function -Werror -Wfatal-errors %s 2> %t.err
+// RUN: FileCheck < %t.err %s
+// CHECK: fatal error: unused function
+// CHECK: 1 error generated
+
+static void f0(void) {} // expected-fatal {{unused function}}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/warning-mapping-4.c b/src/third_party/llvm-project/clang/test/Frontend/warning-mapping-4.c
new file mode 100644
index 0000000..6644042
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/warning-mapping-4.c
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -verify -Wno-error=sign-compare %s
+// RUN: %clang_cc1 -verify -Wsign-compare -w -Wno-error=sign-compare %s
+// expected-no-diagnostics
+
+int f0(int x, unsigned y) {
+  return x < y;
+}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/warning-mapping-5.c b/src/third_party/llvm-project/clang/test/Frontend/warning-mapping-5.c
new file mode 100644
index 0000000..27d53dc
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/warning-mapping-5.c
@@ -0,0 +1,9 @@
+// Check that #pragma diagnostic warning overrides -Werror. This matches GCC's
+// original documentation, but not its earlier implementations.
+// 
+// RUN: %clang_cc1 -verify -Werror %s
+
+#pragma clang diagnostic warning "-Wsign-compare"
+int f0(int x, unsigned y) {
+  return x < y; // expected-warning {{comparison of integers}}
+}
diff --git a/src/third_party/llvm-project/clang/test/Frontend/warning-options.cpp b/src/third_party/llvm-project/clang/test/Frontend/warning-options.cpp
new file mode 100644
index 0000000..3c3396b
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/warning-options.cpp
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -Wmonkey -Wno-monkey -Wno-unused-command-line-arguments \
+// RUN:        -Wno-unused-command-line-argument -Wmodule-build -Rmodule-built %s 2>&1 | FileCheck %s
+// CHECK: unknown warning option '-Wmonkey'
+// CHECK: unknown warning option '-Wno-monkey'
+// CHECK: unknown warning option '-Wno-unused-command-line-arguments'; did you mean '-Wno-unused-command-line-argument'?
+// CHECK: unknown warning option '-Wmodule-build'; did you mean '-Wmodule-conflict'?
+// CHECK: unknown remark option '-Rmodule-built'; did you mean '-Rmodule-build'?
diff --git a/src/third_party/llvm-project/clang/test/Frontend/warning-stdlibcxx-darwin.cpp b/src/third_party/llvm-project/clang/test/Frontend/warning-stdlibcxx-darwin.cpp
new file mode 100644
index 0000000..9f31373
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/warning-stdlibcxx-darwin.cpp
@@ -0,0 +1,5 @@
+// RUN: %clang -cc1 -triple arm64-apple-ios6.0.0 -isysroot %S/doesnotexist %s 2>&1 | FileCheck %s
+// RUN: %clang -cc1 -triple arm64-apple-ios6.0.0 -isysroot %S/doesnotexist -stdlib=libc++ %s -verify
+// CHECK: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead
+
+// expected-no-diagnostics
diff --git a/src/third_party/llvm-project/clang/test/Frontend/windows-exceptions.cpp b/src/third_party/llvm-project/clang/test/Frontend/windows-exceptions.cpp
new file mode 100644
index 0000000..5631687
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/windows-exceptions.cpp
@@ -0,0 +1,27 @@
+// RUN: %clang_cc1 -triple i686--windows-msvc -fsyntax-only %s
+// RUN: not %clang_cc1 -triple i686--windows-msvc -fsyntax-only -fdwarf-exceptions %s 2>&1 | FileCheck -check-prefix=MSVC-X86-DWARF %s
+// RUN: not %clang_cc1 -triple i686--windows-msvc -fsyntax-only -fseh-exceptions %s 2>&1 | FileCheck -check-prefix=MSVC-X86-SEH %s
+// RUN: not %clang_cc1 -triple i686--windows-msvc -fsyntax-only -fsjlj-exceptions %s 2>&1 | FileCheck -check-prefix=MSVC-X86-SJLJ %s
+
+// RUN: %clang_cc1 -triple x86_64--windows-msvc -fsyntax-only %s
+// RUN: not %clang_cc1 -triple x86_64--windows-msvc -fsyntax-only -fdwarf-exceptions %s 2>&1 | FileCheck -check-prefix=MSVC-X64-DWARF %s
+// RUN: not %clang_cc1 -triple x86_64--windows-msvc -fsyntax-only -fseh-exceptions %s 2>&1 | FileCheck -check-prefix=MSVC-X64-SEH %s
+// RUN: not %clang_cc1 -triple x86_64--windows-msvc -fsyntax-only -fsjlj-exceptions %s 2>&1 | FileCheck -check-prefix=MSVC-X64-SJLJ %s
+
+// RUN: %clang_cc1 -triple i686--windows-gnu -fsyntax-only %s
+// RUN: %clang_cc1 -triple i686--windows-gnu -fsyntax-only -fdwarf-exceptions %s
+// RUN: %clang_cc1 -triple i686--windows-gnu -fsyntax-only -fseh-exceptions %s
+// RUN: %clang_cc1 -triple i686--windows-gnu -fsyntax-only -fsjlj-exceptions %s
+
+// RUN: %clang_cc1 -triple x86_64--windows-gnu -fsyntax-only %s
+// RUN: %clang_cc1 -triple x86_64--windows-gnu -fsyntax-only -fdwarf-exceptions %s
+// RUN: %clang_cc1 -triple x86_64--windows-gnu -fsyntax-only -fseh-exceptions %s
+// RUN: %clang_cc1 -triple x86_64--windows-gnu -fsyntax-only -fsjlj-exceptions %s
+
+// MSVC-X86-DWARF: error: invalid exception model 'fdwarf-exceptions' for target 'i686--windows-msvc'
+// MSVC-X86-SEH: error: invalid exception model 'fseh-exceptions' for target 'i686--windows-msvc'
+// MSVC-X86-SJLJ: error: invalid exception model 'fsjlj-exceptions' for target 'i686--windows-msvc'
+
+// MSVC-X64-DWARF: error: invalid exception model 'fdwarf-exceptions' for target 'x86_64--windows-msvc'
+// MSVC-X64-SEH: error: invalid exception model 'fseh-exceptions' for target 'x86_64--windows-msvc'
+// MSVC-X64-SJLJ: error: invalid exception model 'fsjlj-exceptions' for target 'x86_64--windows-msvc'
diff --git a/src/third_party/llvm-project/clang/test/Frontend/windows-nul.c b/src/third_party/llvm-project/clang/test/Frontend/windows-nul.c
new file mode 100644
index 0000000..9f1fc04
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/windows-nul.c
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 nul
+
+// REQUIRES: system-windows
+
+// Verify that cc1 doesn't crash with an assertion failure
+// in MemoryBuffer.cpp due to an invalid file size reported
+// when the Windows 'nul' device is passed in input.
+
diff --git a/src/third_party/llvm-project/clang/test/Frontend/x86-target-cpu.c b/src/third_party/llvm-project/clang/test/Frontend/x86-target-cpu.c
new file mode 100644
index 0000000..0ec301f
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/x86-target-cpu.c
@@ -0,0 +1,39 @@
+// Ensure we support the various CPU names.
+//
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu nocona -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu core2 -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu penryn -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu nehalem -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu westmere -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu sandybridge -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu ivybridge -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu haswell -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu broadwell -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu skylake -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu skylake-avx512 -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu skx -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu cannonlake -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu icelake-client -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu icelake-server -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu knl -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu knm -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu bonnell -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu silvermont -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu k8 -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu opteron -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu athlon64 -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu athlon-fx -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu k8-sse3 -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu opteron-sse3 -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu athlon64-sse3 -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu amdfam10 -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu barcelona -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu bdver1 -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu bdver2 -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu bdver3 -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu bdver4 -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu btver1 -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu btver2 -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-cpu znver1 -verify %s
+//
+// expected-no-diagnostics
diff --git a/src/third_party/llvm-project/clang/test/Frontend/x86_64-nacl-types.cpp b/src/third_party/llvm-project/clang/test/Frontend/x86_64-nacl-types.cpp
new file mode 100644
index 0000000..ca20014
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/Frontend/x86_64-nacl-types.cpp
@@ -0,0 +1,37 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-nacl -std=c++11 -verify %s
+// expected-no-diagnostics
+
+#include <stddef.h>
+#include <stdarg.h>
+
+static_assert(alignof(char) == 1, "alignof char is wrong");
+
+static_assert(sizeof(short) == 2, "sizeof short is wrong");
+static_assert(alignof(short) == 2, "alignof short is wrong");
+
+static_assert(sizeof(int) == 4, "sizeof int is wrong");
+static_assert(alignof(int) == 4, "alignof int is wrong");
+
+static_assert(sizeof(long) == 4, "sizeof long is wrong");
+static_assert(alignof(long) == 4, "alignof long is wrong");
+
+static_assert(sizeof(long long) == 8, "sizeof long long is wrong wrong");
+static_assert(alignof(long long) == 8, "alignof long long is wrong wrong");
+
+static_assert(sizeof(void*) == 4, "sizeof void * is wrong");
+static_assert(alignof(void*) == 4, "alignof void * is wrong");
+
+static_assert(sizeof(float) == 4, "sizeof float is wrong");
+static_assert(alignof(float) == 4, "alignof float is wrong");
+
+static_assert(sizeof(double) == 8, "sizeof double is wrong");
+static_assert(alignof(double) == 8, "alignof double is wrong");
+
+static_assert(sizeof(long double) == 8, "sizeof long double is wrong");
+static_assert(alignof(long double) == 8, "alignof long double is wrong");
+
+static_assert(sizeof(va_list) == 16, "sizeof va_list is wrong");
+static_assert(alignof(va_list) == 4, "alignof va_list is wrong");
+
+static_assert(sizeof(size_t) == 4, "sizeof size_t is wrong");
+static_assert(alignof(size_t) == 4, "alignof size_t is wrong");