kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added subscribers: usaxena95, arphaman. Herald added a project: All. kadircet requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang-tools-extra.
That way when looking at logs it's clear whether diagnostics are a result of compile flags mismatch. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D130228 Files: clang-tools-extra/clangd/tool/Check.cpp Index: clang-tools-extra/clangd/tool/Check.cpp =================================================================== --- clang-tools-extra/clangd/tool/Check.cpp +++ clang-tools-extra/clangd/tool/Check.cpp @@ -111,7 +111,8 @@ if (auto TrueCmd = CDB->getCompileCommand(File)) { Cmd = std::move(*TrueCmd); - log("Compile command from CDB is: {0}", printArgv(Cmd.CommandLine)); + log("Compile command {1} is: {0}", printArgv(Cmd.CommandLine), + Cmd.Heuristic.empty() ? "from CDB" : Cmd.Heuristic); } else { Cmd = CDB->getFallbackCommand(File); log("Generic fallback command is: {0}", printArgv(Cmd.CommandLine));
Index: clang-tools-extra/clangd/tool/Check.cpp =================================================================== --- clang-tools-extra/clangd/tool/Check.cpp +++ clang-tools-extra/clangd/tool/Check.cpp @@ -111,7 +111,8 @@ if (auto TrueCmd = CDB->getCompileCommand(File)) { Cmd = std::move(*TrueCmd); - log("Compile command from CDB is: {0}", printArgv(Cmd.CommandLine)); + log("Compile command {1} is: {0}", printArgv(Cmd.CommandLine), + Cmd.Heuristic.empty() ? "from CDB" : Cmd.Heuristic); } else { Cmd = CDB->getFallbackCommand(File); log("Generic fallback command is: {0}", printArgv(Cmd.CommandLine));
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits