summaryrefslogtreecommitdiff
path: root/lib/Tooling/InterpolatingCompilationDatabase.cpp
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2019-04-05 15:22:20 +0000
committerSam McCall <sam.mccall@gmail.com>2019-04-05 15:22:20 +0000
commit151df10ca73b93b5baca28c9457b33047960b3f6 (patch)
tree4fa20ad2214e46a9bfccb08bec068e531646e633 /lib/Tooling/InterpolatingCompilationDatabase.cpp
parent5d7419d71c87143af9b4a24e40820c6d94956783 (diff)
downloadclang-151df10ca73b93b5baca28c9457b33047960b3f6.tar.gz
[Tooling] add a Heuristic field indicating that a CompileCommand was guessed.
Summary: Use cases: - a tool that dumps the heuristic used for each header in a project can be used to evaluate changes to the heuristic - we want to expose this information to users in clangd as it affects accuracy/reliability of editor features - express interpolation tests more directly Reviewers: ilya-biryukov, klimek Subscribers: ioeric, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60194 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@357770 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Tooling/InterpolatingCompilationDatabase.cpp')
-rw-r--r--lib/Tooling/InterpolatingCompilationDatabase.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Tooling/InterpolatingCompilationDatabase.cpp b/lib/Tooling/InterpolatingCompilationDatabase.cpp
index 82ae6b6261..5124340892 100644
--- a/lib/Tooling/InterpolatingCompilationDatabase.cpp
+++ b/lib/Tooling/InterpolatingCompilationDatabase.cpp
@@ -226,6 +226,7 @@ struct TransferableCommand {
LangStandard::getLangStandardForKind(Std).getName()).str());
}
Result.CommandLine.push_back(Filename);
+ Result.Heuristic = "inferred from " + Cmd.Filename;
return Result;
}