summaryrefslogtreecommitdiffstats
path: root/clang/test/ASTMerge/Inputs/struct2.c
Commit message (Collapse)AuthorAgeFilesLines
* Fixed layout of test/ASTMerge.Sean Callanan2016-11-161-60/+0
| | | | | | | | | | | | | | | | | | | | | | | | | As outlined in a previous RFC, the test/ASTMerge/Inputs folder is getting full and the tests are starting to become interdependent. This is undesirable because - it makes it harder to write new tests - it makes it harder to figure out at a glance what old tests are doing, and - it adds the risk of breaking one test while changing a different one, because of the interdependencies. To fix this, according to the conversation in the RFC, I have changed the layout from a.c Inputs/a1.c Inputs/a2.c to a/test.c a/Inputs/a1.c a/Inputs/a2.c for all existing tests. I have also eliminated interdependencies by replicating the input files for each test that uses them. https://reviews.llvm.org/D26571 llvm-svn: 287129
* Cope with anonymous tags defined within declarators by structurallyDouglas Gregor2010-02-151-0/+6
| | | | | | | | | | | | | | | | | | | | 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 <stdlib.h> and <stdio.h>. Alas, the ASTNodeImporter is getting a little grotty. llvm-svn: 96298
* Reimplement the structural-equality checks used to determine whetherDouglas Gregor2010-02-151-0/+6
| | | | | | | | | | | | | | 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
* Funnel changes to the ImportedDecls list in the ASTImporter through aDouglas Gregor2010-02-121-0/+6
| | | | | | | single Imported function, in preparation for fixing a serious design flaw. llvm-svn: 96044
* Handle AST merges of incomplete class types. Douglas Gregor2010-02-121-0/+9
| | | | llvm-svn: 95941
* When AST merging for record declarations fails, warn about theDouglas Gregor2010-02-111-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | incompatibility and show where the structural differences are. For example: struct1.c:36:8: warning: type 'struct S7' has incompatible definitions in different translation units struct S7 { int i : 8; unsigned j : 8; } x7; ^ struct1.c:36:33: note: bit-field 'j' with type 'unsigned int' and length 8 here struct S7 { int i : 8; unsigned j : 8; } x7; ^ struct2.c:33:33: note: bit-field 'j' with type 'unsigned int' and length 16 here struct S7 { int i : 8; unsigned j : 16; } x7; ^ There are a few changes to make this work: - ASTImporter now has only a single Diagnostic object, not multiple diagnostic objects. Otherwise, having a warning/error printed via one Diagnostic and its note printed on the other Diagnostic could cause the note to be suppressed. - Implemented import functionality for IntegerLiteral (along with general support for statements and expressions) llvm-svn: 95900
* Add missing test cases for AST merging of structures.Douglas Gregor2010-02-111-0/+13
llvm-svn: 95886
OpenPOWER on IntegriCloud