llvm-project/clang/unittests/Tooling
Argyrios Kyrtzidis b4c83a13f6 [Tooling/DependencyScanning & Preprocessor] Refactor dependency scanning to produce pre-lexed preprocessor directive tokens, instead of minimized sources
This is a commit with the following changes:

* Remove `ExcludedPreprocessorDirectiveSkipMapping` and related functionality

Removes `ExcludedPreprocessorDirectiveSkipMapping`; its intended benefit for fast skipping of excluded directived blocks
will be superseded by a follow-up patch in the series that will use dependency scanning lexing for the same purpose.

* Refactor dependency scanning to produce pre-lexed preprocessor directive tokens, instead of minimized sources

Replaces the "source minimization" mechanism with a mechanism that produces lexed dependency directives tokens.

* Make the special lexing for dependency scanning a first-class feature of the `Preprocessor` and `Lexer`

This is bringing the following benefits:

    * Full access to the preprocessor state during dependency scanning. E.g. a component can see what includes were taken and where they were located in the actual sources.
    * Improved performance for dependency scanning. Measurements with a release+thin-LTO build shows ~ -11% reduction in wall time.
    * Opportunity to use dependency scanning lexing to speed-up skipping of excluded conditional blocks during normal preprocessing (as follow-up, not part of this patch).

For normal preprocessing measurements show differences are below the noise level.

Since, after this change, we don't minimize sources and pass them in place of the real sources, `DependencyScanningFilesystem` is not technically necessary, but it has valuable performance benefits for caching file `stat`s along with the results of scanning the sources. So the setup of using the `DependencyScanningFilesystem` during a dependency scan remains.

Differential Revision: https://reviews.llvm.org/D125486
Differential Revision: https://reviews.llvm.org/D125487
Differential Revision: https://reviews.llvm.org/D125488
2022-05-26 12:50:06 -07:00
..
RecursiveASTVisitorTests [AST] Improve traversal of concepts and concept requirements 2022-04-28 09:33:26 +00:00
Syntax [clang] createInvocationFromCommandLine -> createInvocation, delete former. NFC 2022-05-06 16:21:48 +02:00
ASTSelectionTest.cpp
CMakeLists.txt [Testing] TestAST, a helper for writing straight-line AST tests 2022-04-21 21:46:45 +02:00
CastExprTest.cpp Ignore FullExpr when traversing cast sub-expressions 2022-03-21 15:05:53 -04:00
CommentHandlerTest.cpp
CompilationDatabaseTest.cpp compile commands header to source heuristic lower-cases filenames before inferring file types 2022-04-25 20:40:56 +02:00
DependencyScannerTest.cpp [Tooling/DependencyScanning & Preprocessor] Refactor dependency scanning to produce pre-lexed preprocessor directive tokens, instead of minimized sources 2022-05-26 12:50:06 -07:00
DiagnosticsYamlTest.cpp Remark was added to clang tooling Diagnostic 2021-05-24 11:21:44 -04:00
ExecutionTest.cpp
FixItTest.cpp [Testing] TestAST, a helper for writing straight-line AST tests 2022-04-21 21:46:45 +02:00
HeaderIncludesTest.cpp [clangd] Crash in __memcmp_avx2_movbe 2022-02-10 09:40:44 -08:00
LexicallyOrderedRecursiveASTVisitorTest.cpp
LookupTest.cpp [clang] Adjust LookupTest for UsingTypeLocs 2022-03-07 16:22:03 +01:00
QualTypeNamesTest.cpp [AST] Add more testcases to QualTypeNamesTest. NFC 2021-12-15 21:59:54 +01:00
RangeSelectorTest.cpp Widen `name` stencil to support `TypeLoc` nodes. 2021-05-13 23:23:12 +01:00
RecursiveASTVisitorTestDeclVisitor.cpp
RecursiveASTVisitorTestPostOrderVisitor.cpp [ADT] Remove APInt/APSInt toString() std::string variants 2021-06-11 13:19:15 +01:00
RecursiveASTVisitorTestTypeLocVisitor.cpp
RefactoringActionRulesTest.cpp
RefactoringCallbacksTest.cpp Remove references to the ast_type_traits namespace 2020-12-11 00:58:46 +01:00
RefactoringTest.cpp Support: Use sys::path::is_style_{posix,windows}() in a few places 2021-10-29 12:09:41 -07:00
ReplacementTest.h
ReplacementsYamlTest.cpp [yaml][clang-tidy] Fix multiline YAML serialization 2020-07-09 02:41:58 -07:00
RewriterTest.cpp
RewriterTestContext.h Tooling: Migrate some tests to FileEntryRef, NFC 2020-12-10 18:05:03 -08:00
SourceCodeBuildersTest.cpp [libTooling] Adds more support for constructing object access expressions. 2022-01-25 19:43:36 +00:00
SourceCodeTest.cpp [clang][AST] Handle overload callee type in CallExpr::getCallReturnType. 2021-04-12 09:44:17 +02:00
StandardLibraryTest.cpp [Testing] TestAST, a helper for writing straight-line AST tests 2022-04-21 21:46:45 +02:00
StencilTest.cpp [RGT] StencilTest: Fix an assertion 2022-03-18 14:13:41 -07:00
TestVisitor.h
ToolingTest.cpp Move TargetRegistry.(h|cpp) from Support to MC 2021-10-08 14:51:48 -07:00
TransformerTest.cpp [libTooling] Fix indentation. NFC. 2022-03-28 18:34:45 +00:00