summaryrefslogtreecommitdiffstats
path: root/clang/test/ASTMerge/Inputs/var2.c
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-02-10 00:15:17 +0000
committerDouglas Gregor <dgregor@apple.com>2010-02-10 00:15:17 +0000
commit811663eb1151f7a209160f2b071a79bf43daf85f (patch)
treedcbe7092e01fd690a98bdb23d51e8c692cadcac5 /clang/test/ASTMerge/Inputs/var2.c
parent08f618cd031c7cc70e7f63711efc748d3bb8f36c (diff)
downloadbcm5719-llvm-811663eb1151f7a209160f2b071a79bf43daf85f.tar.gz
bcm5719-llvm-811663eb1151f7a209160f2b071a79bf43daf85f.zip
Implement basic support for importing source locations from one AST
into another AST, including their include history. Here's an example error that involves a conflict merging a variable with different types in two translation units (diagnosed in the third AST context into which everything is merged). /Volumes/Data/dgregor/Projects/llvm/tools/clang/test/ASTMerge/Inputs/var2.c:3:5: error: external variable 'x2' declared with incompatible types in different translation units ('int' vs. 'double') int x2; ^ In file included from /Volumes/Data/dgregor/Projects/llvm/tools/clang/test/ASTMerge/Inputs/var1.c:3: /Volumes/Data/dgregor/Projects/llvm/tools/clang/test/ASTMerge/Inputs/var1.h:1:8: note: declared here with type 'double' double x2; ^ Although we maintain include history, we do not maintain macro instantiation history across a merge. Instead, we map down to the spelling location (for now!). llvm-svn: 95732
Diffstat (limited to 'clang/test/ASTMerge/Inputs/var2.c')
-rw-r--r--clang/test/ASTMerge/Inputs/var2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/test/ASTMerge/Inputs/var2.c b/clang/test/ASTMerge/Inputs/var2.c
index 526a45b9f7c..e93a010cbfe 100644
--- a/clang/test/ASTMerge/Inputs/var2.c
+++ b/clang/test/ASTMerge/Inputs/var2.c
@@ -1,2 +1,3 @@
int *x0;
double *x1;
+int x2;
OpenPOWER on IntegriCloud