summaryrefslogtreecommitdiff
path: root/test/ASTMerge
diff options
context:
space:
mode:
Diffstat (limited to 'test/ASTMerge')
-rw-r--r--test/ASTMerge/Inputs/body1.c6
-rw-r--r--test/ASTMerge/Inputs/body2.c4
-rw-r--r--test/ASTMerge/codegen-body.c6
-rw-r--r--test/ASTMerge/codegen-exprs.c5
4 files changed, 21 insertions, 0 deletions
diff --git a/test/ASTMerge/Inputs/body1.c b/test/ASTMerge/Inputs/body1.c
new file mode 100644
index 000000000000..d4d1e4b93781
--- /dev/null
+++ b/test/ASTMerge/Inputs/body1.c
@@ -0,0 +1,6 @@
+int f();
+
+int main()
+{
+ return f();
+}
diff --git a/test/ASTMerge/Inputs/body2.c b/test/ASTMerge/Inputs/body2.c
new file mode 100644
index 000000000000..73cb1edf9917
--- /dev/null
+++ b/test/ASTMerge/Inputs/body2.c
@@ -0,0 +1,4 @@
+__inline__ __attribute__ ((always_inline)) int f()
+{
+ return 2;
+}
diff --git a/test/ASTMerge/codegen-body.c b/test/ASTMerge/codegen-body.c
new file mode 100644
index 000000000000..a5c260cd91bb
--- /dev/null
+++ b/test/ASTMerge/codegen-body.c
@@ -0,0 +1,6 @@
+// XFAIL: hexagon
+// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/body1.c
+// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/body2.c
+// RUN: %clang_cc1 -emit-obj -o /dev/null -ast-merge %t.1.ast -ast-merge %t.2.ast %s
+// expected-no-diagnostics
+
diff --git a/test/ASTMerge/codegen-exprs.c b/test/ASTMerge/codegen-exprs.c
new file mode 100644
index 000000000000..6c4a575d6096
--- /dev/null
+++ b/test/ASTMerge/codegen-exprs.c
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/exprs1.c
+// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/exprs2.c
+// RUN: %clang_cc1 -emit-obj -o /dev/null -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only -verify %s
+// expected-no-diagnostics
+