llvm-project/clang/unittests
Aleksei Sidorin 04fbffcc52 [ASTImporter] Allow testing of import sequences; fix import of typedefs for anonymous decls
This patch introduces the ability to test an arbitrary sequence of imports
between a given set of virtual source files. This should finally allow
us to write simple tests and fix annoying issues inside ASTImporter
that cause failures in CSA CTU. This is done by refactoring
ASTImporterTest functions and introducing `testImportSequence` facility.
As a side effect, `testImport` facility was generalized a bit more. It
should now allow import of non-decl AST nodes; however, there is still no
test using this ability.

As a "test for test", there is also a fix for import anonymous TagDecls
referred by typedef. Before this patch, the setting of typedef for anonymous
structure was delayed; however, this approach misses the corner case if
an enum constant is imported directly. In this patch, typedefs for
anonymous declarations are imported right after the anonymous declaration
is imported, without any delay.

Thanks to Adam Balogh for suggestions included into this patch.

Differential Revision: https://reviews.llvm.org/D44079

llvm-svn: 330704
2018-04-24 10:11:53 +00:00
..
AST [ASTImporter] Allow testing of import sequences; fix import of typedefs for anonymous decls 2018-04-24 10:11:53 +00:00
ASTMatchers [ASTMatchers] Introduce a matcher for matching any given Objective-C selector 2018-03-29 00:51:12 +00:00
Analysis [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
Basic Fixes errors with FS iterators caused by https://reviews.llvm.org/D44960 2018-04-04 19:47:25 +00:00
CodeGen Unit tests for TBAA metadata generation. 2017-12-22 15:22:45 +00:00
CrossTU Revert "[Tooling] [0/1] Refactor FrontendActionFactory::create() to return std::unique_ptr<>" 2018-02-27 15:54:55 +00:00
Driver Add a unit test for Driver::getDefaultModuleCachePath(). 2018-02-12 17:59:54 +00:00
Format Format closing braces when reformatting the line containing the opening brace. 2018-04-23 09:34:26 +00:00
Frontend Add possibility to specify output stream for CompilerInstance 2018-03-02 12:11:40 +00:00
Lex [Lexer] Support adding working directory to relative search dir for #include shortening in HeaderSearch. 2018-01-29 13:21:23 +00:00
Rename Unittests misc. typos 2018-02-06 13:12:29 +00:00
Rewrite [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
Sema Revert "[Tooling] [0/1] Refactor FrontendActionFactory::create() to return std::unique_ptr<>" 2018-02-27 15:54:55 +00:00
StaticAnalyzer Unittests misc. typos 2018-02-06 13:12:29 +00:00
Tooling [UnitTests] NFC/build-perf: Break up nontrivial compile jobs 2018-04-19 18:19:02 +00:00
libclang [libclang] Fix LibclangReparseTest.FileName when TMPDIR is set to a symlink 2018-04-21 14:35:18 +00:00
CMakeLists.txt Add Cross Translation Unit support library 2017-09-22 11:11:01 +00:00