[clang-tools-extra] r321094 - [clangd] Supress a log warning by putting it behind a condition.

Eric Liu via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 19 10:10:32 PST 2017


Author: ioeric
Date: Tue Dec 19 10:10:32 2017
New Revision: 321094

URL: http://llvm.org/viewvc/llvm-project?rev=321094&view=rev
Log:
[clangd] Supress a log warning by putting it behind a condition.

Modified:
    clang-tools-extra/trunk/clangd/CodeComplete.cpp

Modified: clang-tools-extra/trunk/clangd/CodeComplete.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/CodeComplete.cpp?rev=321094&r1=321093&r2=321094&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/CodeComplete.cpp (original)
+++ clang-tools-extra/trunk/clangd/CodeComplete.cpp Tue Dec 19 10:10:32 2017
@@ -830,8 +830,9 @@ CompletionList codeComplete(const Contex
                      FileName, Command, Preamble, Contents, Pos, std::move(VFS),
                      std::move(PCHs));
   if (Opts.Index && CompletedName.SSInfo) {
-    log(Ctx, "WARNING: Got completion results from sema for completion on "
-             "qualified ID while symbol index is provided.");
+    if (!Results.items.empty())
+      log(Ctx, "WARNING: Got completion results from sema for completion on "
+               "qualified ID while symbol index is provided.");
     Results.items.clear();
     completeWithIndex(Ctx, *Opts.Index, Contents, *CompletedName.SSInfo,
                       CompletedName.Filter, &Results);




More information about the cfe-commits mailing list