llvm-project/clang/lib/Tooling
Michael Spencer d816d9bdc5 [clang][ScanDeps] Fix issue with multiple commands with the same input.
Previously, given a CompilationDatabase with two commands for the same
source file we would report that file twice with the union of the
dependencies for each command both times.

This was due to the way `ClangTool` runs actions given an input source
file (see the comment in `DependencyScanningTool.cpp`). This commit adds
a `SingleCommandCompilationDatabase` that is created with each
`CompileCommand` in the original CDB, which is then used for each
`ClangTool` invocation. This gives us a single run of
`DependencyScanningAction` per `CompileCommand`.

I looked at using `AllTUsToolExecutor` which is a parallel tool
executor, but I'm not sure it's suitable for `clang-scan-deps` as it
does a lot more sharing of state than `AllTUsToolExecutor` expects.

Differential Revision: https://reviews.llvm.org/D69643
2019-10-31 14:22:01 -07:00
..
ASTDiff [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
Core [clang] Adopt new FileManager error-returning APIs 2019-08-01 21:31:56 +00:00
DependencyScanning [clang][ScanDeps] Fix issue with multiple commands with the same input. 2019-10-31 14:22:01 -07:00
Inclusions [clang-format] Modified SortIncludes and IncludeCategories to priority for sorting #includes within the Group Category. 2019-09-25 20:33:01 +00:00
Refactoring [clang-rename] NFC, make getCanonicalSymbolDeclaration robust on nullptr input. 2019-10-25 14:33:04 +02:00
Syntax [Syntax] Added function to get macro expansion tokens to TokenBuffer. 2019-08-20 13:34:01 +00:00
Transformer [libTooling] Put all Transformer declarations in a single namespace. 2019-10-16 01:06:46 +00:00
AllTUsExecution.cpp Prune Pass.h include from DataLayout.h. NFCI 2019-10-21 17:51:54 +00:00
ArgumentsAdjusters.cpp [clang-scan-deps] strip the --serialize-diagnostics argument 2019-09-21 00:17:26 +00:00
CMakeLists.txt [libTooling] Move Transformer files to their own directory/library. 2019-10-10 02:34:47 +00:00
CommonOptionsParser.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
CompilationDatabase.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
Execution.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FileMatchTrie.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FixIt.cpp [LibTooling] Add "SourceCode" library for functions relating to source-code manipulation. 2019-04-05 14:05:03 +00:00
GuessTargetAndModeCompilationDatabase.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
InterpolatingCompilationDatabase.cpp [Driver] Use shared singleton instance of DriverOptTable 2019-09-04 14:26:28 +00:00
JSONCompilationDatabase.cpp Re-land [JSONCompilationDatabase] Strip distcc/ccache/gomacc wrappers from parsed commands. 2019-07-12 23:38:31 +00:00
Refactoring.cpp [clang] Adopt new FileManager error-returning APIs 2019-08-01 21:31:56 +00:00
RefactoringCallbacks.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
StandaloneExecution.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
Tooling.cpp [tooling] Relax an assert when multiple GPU targets are specified. 2019-10-18 15:03:34 +00:00