Teach AST merging that variables with incomplete array types can be
merged with variables of constant array types. Also, make sure that we
call DiagnosticClient's BeginSourceFile/EndSourceFile, so that it has
a LangOptions to work with.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95782 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/ASTMerge/Inputs/var1.c b/test/ASTMerge/Inputs/var1.c
index 4652589..4f5cbe1 100644
--- a/test/ASTMerge/Inputs/var1.c
+++ b/test/ASTMerge/Inputs/var1.c
@@ -1,3 +1,7 @@
 int *x0;
 float **x1;
 #include "var1.h"
+int xarray0[17];
+int xarray1[];
+int xarray2[18];
+int xarray3[18];
diff --git a/test/ASTMerge/Inputs/var2.c b/test/ASTMerge/Inputs/var2.c
index e93a010..01986e4 100644
--- a/test/ASTMerge/Inputs/var2.c
+++ b/test/ASTMerge/Inputs/var2.c
@@ -1,3 +1,7 @@
 int *x0;
 double *x1;
 int x2;
+int xarray0[17];
+int xarray1[17];
+int xarray2[];
+int xarray3[17];
diff --git a/test/ASTMerge/var.c b/test/ASTMerge/var.c
index 98ad7ab..06bebd5 100644
--- a/test/ASTMerge/var.c
+++ b/test/ASTMerge/var.c
@@ -7,3 +7,5 @@
 // CHECK: var2.c:3:5: error: external variable 'x2' declared with incompatible types in different translation units ('int' vs. 'double')
 // CHECK: In file included from{{.*}}var1.c:3:
 // CHECK: var1.h:1:8: note: declared here with type 'double'
+// CHECK: error: external variable 'xarray3' declared with incompatible types in different translation units ('int [17]' vs. 'int [18]')
+// CHECK: var1.c:7:5: note: declared here with type 'int [18]'