From b4964f7705679d42efe646178d68377db15a80c0 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Mon, 15 Feb 2010 23:54:17 +0000 Subject: Cope with anonymous tags defined within declarators by structurally comparing their types under the assumption that they are equivalent, rather than importing the types and then checking for compatibility. A few minor tweaks here: - Teach structural matching to handle compatibility between function types with prototypes and those without prototypes. - Teach structural matching that an incomplete record decl is the same as any other record decl with the same name. - Keep track of pairs of declarations that we have already checked (but failed to find as structurally matching), so we don't emit diagnostics repeatedly. - When importing a typedef of an anonymous tag, be sure to link the imported tag type to its typedef. With these changes, we survive a repeated import of and . Alas, the ASTNodeImporter is getting a little grotty. llvm-svn: 96298 --- clang/test/ASTMerge/Inputs/struct1.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'clang/test/ASTMerge/Inputs/struct1.c') diff --git a/clang/test/ASTMerge/Inputs/struct1.c b/clang/test/ASTMerge/Inputs/struct1.c index e6d71ac1b49..af2af8abc42 100644 --- a/clang/test/ASTMerge/Inputs/struct1.c +++ b/clang/test/ASTMerge/Inputs/struct1.c @@ -55,3 +55,9 @@ struct DeepError { int value; struct DeeperError { int i; int f; } *Deeper; } xDeep; + +// Matches +struct { + Int i; + float f; +} x11; -- cgit v1.2.3