diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-02-15 22:01:00 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-02-15 22:01:00 +0000 |
commit | 3996e249ed50b865723d8ebae39489a64305c2f4 (patch) | |
tree | 7a448c27bd1c745507ea5cc794ff8eb8c8c8bea4 /clang/test/ASTMerge/struct.c | |
parent | 9be7200b087e690e90f3ffeb623af0326fa6b4fe (diff) | |
download | bcm5719-llvm-3996e249ed50b865723d8ebae39489a64305c2f4.tar.gz bcm5719-llvm-3996e249ed50b865723d8ebae39489a64305c2f4.zip |
Reimplement the structural-equality checks used to determine whether
two types in different AST contexts are equivalent. Rather than
transforming the type from one context into the other context, we
perform a deep structural comparison of the types. This change
addresses a serious problem with recursive data types like
struct ListNode {
int value;
struct ListNode *Next;
} xList;
llvm-svn: 96278
Diffstat (limited to 'clang/test/ASTMerge/struct.c')
-rw-r--r-- | clang/test/ASTMerge/struct.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/test/ASTMerge/struct.c b/clang/test/ASTMerge/struct.c index c6e57185abe..d71436f2fcf 100644 --- a/clang/test/ASTMerge/struct.c +++ b/clang/test/ASTMerge/struct.c @@ -31,4 +31,9 @@ // CHECK: struct2.c:33:33: note: bit-field 'j' with type 'unsigned int' and length 16 here // CHECK: struct2.c:33:43: error: external variable 'x7' declared with incompatible types in different translation units ('struct S7' vs. 'struct S7') // CHECK: struct1.c:36:42: note: declared here with type 'struct S7' -// CHECK: 29 diagnostics +// CHECK: struct1.c:56:10: warning: type 'struct DeeperError' has incompatible definitions in different translation units +// CHECK: struct1.c:56:35: note: field 'f' has type 'int' here +// CHECK: struct2.c:53:37: note: field 'f' has type 'float' here +// CHECK: struct2.c:54:3: error: external variable 'xDeep' declared with incompatible types in different translation units ('struct DeepError' vs. 'struct DeepError') +// CHECK: struct1.c:57:3: note: declared here with type 'struct DeepError' +// CHECK: 37 diagnostics |