[clangd] Mention whether compile flags were inferred in check mode

That way when looking at logs it's clear whether diagnostics are a
result of compile flags mismatch.

Differential Revision: https://reviews.llvm.org/D130228
This commit is contained in:
Kadir Cetinkaya 2022-07-21 10:20:00 +02:00
parent 4db55a459e
commit 1515490c80
No known key found for this signature in database
GPG key ID: E39E36B8D2057ED6

View file

@ -111,7 +111,9 @@ public:
if (auto TrueCmd = CDB->getCompileCommand(File)) {
Cmd = std::move(*TrueCmd);
log("Compile command from CDB is: {0}", printArgv(Cmd.CommandLine));
log("Compile command {0} is: {1}",
Cmd.Heuristic.empty() ? "from CDB" : Cmd.Heuristic,
printArgv(Cmd.CommandLine));
} else {
Cmd = CDB->getFallbackCommand(File);
log("Generic fallback command is: {0}", printArgv(Cmd.CommandLine));