diff --git a/clang-tools-extra/clangd/tool/Check.cpp b/clang-tools-extra/clangd/tool/Check.cpp index 4a6f6f8857aa0..d1ece69e3ba08 100644 --- a/clang-tools-extra/clangd/tool/Check.cpp +++ b/clang-tools-extra/clangd/tool/Check.cpp @@ -24,12 +24,17 @@ // //===----------------------------------------------------------------------===// +#include "../clang-tidy/ClangTidyModule.h" #include "../clang-tidy/ClangTidyModuleRegistry.h" +#include "../clang-tidy/ClangTidyOptions.h" #include "../clang-tidy/GlobList.h" #include "ClangdLSPServer.h" +#include "ClangdServer.h" #include "CodeComplete.h" #include "CompileCommands.h" +#include "Compiler.h" #include "Config.h" +#include "Diagnostics.h" #include "Feature.h" #include "GlobalCompilationDatabase.h" #include "Hover.h" @@ -37,23 +42,39 @@ #include "ParsedAST.h" #include "Preamble.h" #include "Protocol.h" +#include "Selection.h" #include "SemanticHighlighting.h" #include "SourceCode.h" +#include "TidyProvider.h" #include "XRefs.h" #include "index/CanonicalIncludes.h" #include "index/FileIndex.h" #include "refactor/Tweak.h" +#include "support/Context.h" +#include "support/Logger.h" #include "support/ThreadsafeFS.h" #include "support/Trace.h" #include "clang/AST/ASTContext.h" #include "clang/Basic/Diagnostic.h" +#include "clang/Basic/LLVM.h" #include "clang/Format/Format.h" #include "clang/Frontend/CompilerInvocation.h" #include "clang/Tooling/CompilationDatabase.h" #include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/SmallString.h" +#include "llvm/Support/Chrono.h" +#include "llvm/Support/CommandLine.h" #include "llvm/Support/Path.h" #include "llvm/Support/Process.h" +#include +#include +#include +#include +#include #include +#include +#include namespace clang { namespace clangd { @@ -153,12 +174,13 @@ class Checker { if (auto TrueCmd = CDB->getCompileCommand(File)) { Cmd = std::move(*TrueCmd); - log("Compile command {0} is: {1}", - Cmd.Heuristic.empty() ? "from CDB" : Cmd.Heuristic, + log("Compile command {0} is: [{1}] {2}", + Cmd.Heuristic.empty() ? "from CDB" : Cmd.Heuristic, Cmd.Directory, printArgv(Cmd.CommandLine)); } else { Cmd = CDB->getFallbackCommand(File); - log("Generic fallback command is: {0}", printArgv(Cmd.CommandLine)); + log("Generic fallback command is: [{0}] {1}", Cmd.Directory, + printArgv(Cmd.CommandLine)); } return true;