From 03e56fe65df27ef01f553d2ffe6b67af2db41508 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Tue, 19 Dec 2017 18:10:32 +0000 Subject: [clangd] Supress a log warning by putting it behind a condition. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321094 91177308-0d34-0410-b5e6-96231b3b80d8 --- clangd/CodeComplete.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/clangd/CodeComplete.cpp b/clangd/CodeComplete.cpp index 7e549a90..cb56afe9 100644 --- a/clangd/CodeComplete.cpp +++ b/clangd/CodeComplete.cpp @@ -830,8 +830,9 @@ CompletionList codeComplete(const Context &Ctx, PathRef FileName, 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); -- cgit v1.2.3