llvm-project/clang/unittests/AST
Raphael Isemann c0bcd11068 [ASTImporter] Add basic support for comparing Stmts and compare function bodies
Right now the ASTImporter assumes for most Expr nodes that they are always equal
which leads to non-compatible declarations ending up being merged. This patch
adds the basic framework for comparing Stmts (and with that also Exprs) and
implements the custom checks for a few Stmt subclasses. I'll implement the
remaining subclasses in follow up patches (mostly because there are a lot of
subclasses and some of them require further changes like having GNU language in
the testing framework)

The motivation for this is that in LLDB we try to import libc++ source code and
some of the types we are importing there contain expressions (e.g. because they
use `enable_if<expr>`), so those declarations are currently merged even if they
are completely different (e.g. `enable_if<value> ...` and `enable_if<!value>
...` are currently considered equal which is clearly not true).

Reviewed By: martong, balazske

Differential Revision: https://reviews.llvm.org/D87444
2020-09-13 18:25:04 +02:00
..
ASTContextParentMapTest.cpp Remove clang::ast_type_traits namespace in favor of clang 2020-02-13 10:46:47 -08:00
ASTImporterFixtures.cpp Rename APIs in unittests/AST/Language.h in preparation to share them 2020-05-29 14:25:20 +02:00
ASTImporterFixtures.h [ASTImporter] Refactor ASTImporter to support custom downstream tests 2020-07-21 10:34:17 -05:00
ASTImporterGenericRedeclTest.cpp Renamed Lang_C to Lang_C99, Lang_CXX to Lang_CXX03, and 2a to 20 2020-06-02 16:31:20 +02:00
ASTImporterODRStrategiesTest.cpp Renamed Lang_C to Lang_C99, Lang_CXX to Lang_CXX03, and 2a to 20 2020-06-02 16:31:20 +02:00
ASTImporterTest.cpp [clang][NFC] Properly fix a GCC warning in ASTImporterTest.cpp 2020-08-26 17:10:13 +02:00
ASTImporterVisibilityTest.cpp Rename APIs in unittests/AST/Language.h in preparation to share them 2020-05-29 14:25:20 +02:00
ASTPrint.h [clang][OpeMP] Model OpenMP structured-block in AST (PR40563) 2019-03-20 16:32:36 +00:00
ASTTraverserTest.cpp When performing a substitution into a dependent alias template, mark the 2020-06-23 14:43:04 -07:00
ASTTypeTraitsTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ASTVectorTest.cpp Add some missing header dependencies 2020-02-27 14:32:12 -08:00
CMakeLists.txt Revert "[clang] Prevent that Decl::dump on a CXXRecordDecl deserialises further declarations." 2020-09-07 14:50:13 +02:00
CommentLexer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CommentParser.cpp [AST] Fixed string list in test 2020-08-09 23:17:48 +02:00
CommentTextTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DataCollectionTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DeclMatcher.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DeclPrinterTest.cpp [clang] Add -fno-delayed-template-parsing to the added unit tests in DeclPrinterTest.cpp 2020-08-05 14:13:05 +01:00
DeclTest.cpp Added 'const' as suggested by ClangTidy llvm-qualified-auto 2020-03-13 11:49:23 +01:00
EvaluateAsRValueTest.cpp [Tooling] Migrated APIs that take ownership of objects to unique_ptr 2019-08-30 09:29:34 +00:00
ExternalASTSourceTest.cpp ArrayRef'ized CompilerInvocation::CreateFromArgs 2019-08-27 22:13:31 +00:00
MatchVerifier.h [clang][NFC] Store a pointer to the ASTContext in ASTDumper and TextNodeDumper 2020-07-03 13:59:22 +01:00
NamedDeclPrinterTest.cpp [AST] Fix the PrintQualifiedName for ObjC instance variable in class extension. 2020-05-19 15:17:36 +02:00
RecursiveASTVisitorTest.cpp [Tooling] Migrated APIs that take ownership of objects to unique_ptr 2019-08-30 09:29:34 +00:00
SizelessTypesTest.cpp [llvm][SveEmitter] Emit the bfloat version of `svld1ro`. 2020-06-18 16:36:31 +00:00
SourceLocationTest.cpp Summary: [clang] Provide a way for WhileStmt to report the location of its LParen and RParen. 2020-07-10 21:31:16 -04:00
StmtPrinterTest.cpp Set traversal explicitly where needed in tests 2020-05-21 22:34:38 +01:00
StructuralEquivalenceTest.cpp [ASTImporter] Add basic support for comparing Stmts and compare function bodies 2020-09-13 18:25:04 +02:00