19bed8798964d9f07599c2c9199701f86fbc70e20Douglas Gregor// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/var1.c 29bed8798964d9f07599c2c9199701f86fbc70e20Douglas Gregor// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/var2.c 334b8e6889a12c90e8053fba8a1ea49b17c05ac51Chandler Carruth// RUN: %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only -fdiagnostics-show-note-include-stack %s 2>&1 | FileCheck %s 49bed8798964d9f07599c2c9199701f86fbc70e20Douglas Gregor 5885237354fd902998c6ae9d7cc3dc8de96b123dcDouglas Gregor// CHECK: var2.c:2:9: error: external variable 'x1' declared with incompatible types in different translation units ('double *' vs. 'float **') 6885237354fd902998c6ae9d7cc3dc8de96b123dcDouglas Gregor// CHECK: var1.c:2:9: note: declared here with type 'float **' 7885237354fd902998c6ae9d7cc3dc8de96b123dcDouglas Gregor// CHECK: var2.c:3:5: error: external variable 'x2' declared with incompatible types in different translation units ('int' vs. 'double') 8885237354fd902998c6ae9d7cc3dc8de96b123dcDouglas Gregor// CHECK: In file included from{{.*}}var1.c:3: 9885237354fd902998c6ae9d7cc3dc8de96b123dcDouglas Gregor// CHECK: var1.h:1:8: note: declared here with type 'double' 100f962a8e61e1c094a89df17f9d3ad947d31c4e5cDouglas Gregor// CHECK: error: external variable 'xarray3' declared with incompatible types in different translation units ('int [17]' vs. 'int [18]') 110f962a8e61e1c094a89df17f9d3ad947d31c4e5cDouglas Gregor// CHECK: var1.c:7:5: note: declared here with type 'int [18]' 1253eee7ba970d21ff15bbd4334164037a3b4cc4b8Chris Lattner// CHECK: 3 errors 13