From 151df10ca73b93b5baca28c9457b33047960b3f6 Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Fri, 5 Apr 2019 15:22:20 +0000 Subject: [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 --- lib/Tooling/InterpolatingCompilationDatabase.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/Tooling/InterpolatingCompilationDatabase.cpp') 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; } -- cgit v1.2.1