aboutsummaryrefslogtreecommitdiff
path: root/test/ASTMerge/struct.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/ASTMerge/struct.c')
-rw-r--r--test/ASTMerge/struct.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ASTMerge/struct.c b/test/ASTMerge/struct.c
new file mode 100644
index 0000000000..99fa74b10d
--- /dev/null
+++ b/test/ASTMerge/struct.c
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/struct1.c
+// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/struct2.c
+// RUN: %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
+
+// CHECK: struct2.c:13:11: error: external variable 'x1' declared with incompatible types in different translation units ('struct S1' vs. 'struct S1')
+// CHECK: struct1.c:16:11: note: declared here with type 'struct S1'
+// CHECK: 2 diagnostics