[clang-tools-extra] r358157 - [clangd] Include compile command heuristic in logs

Sam McCall via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 11 01:17:16 PDT 2019


Author: sammccall
Date: Thu Apr 11 01:17:15 2019
New Revision: 358157

URL: http://llvm.org/viewvc/llvm-project?rev=358157&view=rev
Log:
[clangd] Include compile command heuristic in logs

Modified:
    clang-tools-extra/trunk/clangd/TUScheduler.cpp
    clang-tools-extra/trunk/test/clangd/did-change-configuration-params.test

Modified: clang-tools-extra/trunk/clangd/TUScheduler.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/TUScheduler.cpp?rev=358157&r1=358156&r2=358157&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/TUScheduler.cpp (original)
+++ clang-tools-extra/trunk/clangd/TUScheduler.cpp Thu Apr 11 01:17:15 2019
@@ -355,7 +355,8 @@ void ASTWorker::update(ParseInputs Input
     FileInputs = Inputs;
     DiagsWereReported = false;
     emitTUStatus({TUAction::BuildingPreamble, TaskName});
-    log("Updating file {0} with command [{1}] {2}", FileName,
+    log("Updating file {0} with command {1}\n[{2}]\n{3}", FileName,
+        Inputs.CompileCommand.Heuristic,
         Inputs.CompileCommand.Directory,
         llvm::join(Inputs.CompileCommand.CommandLine, " "));
     // Rebuild the preamble and the AST.

Modified: clang-tools-extra/trunk/test/clangd/did-change-configuration-params.test
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clangd/did-change-configuration-params.test?rev=358157&r1=358156&r2=358157&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clangd/did-change-configuration-params.test (original)
+++ clang-tools-extra/trunk/test/clangd/did-change-configuration-params.test Thu Apr 11 01:17:15 2019
@@ -41,7 +41,9 @@
 # CHECK-NEXT:    "uri": "file://{{.*}}/foo.c"
 # CHECK-NEXT:  }
 #
-# ERR: Updating file {{.*}}foo.c with command [{{.*}}clangd-test2] clang -c foo.c -Wall -Werror
+# ERR: Updating file {{.*}}foo.c with command
+# ERR: [{{.*}}clangd-test2]
+# ERR: clang -c foo.c -Wall -Werror
 # Don't reparse the second file:
 # ERR: Skipping rebuild of the AST for {{.*}}bar.c
 ---




More information about the cfe-commits mailing list