diff options
author | Eric Liu <ioeric@google.com> | 2017-12-19 18:10:32 +0000 |
---|---|---|
committer | Eric Liu <ioeric@google.com> | 2017-12-19 18:10:32 +0000 |
commit | 03e56fe65df27ef01f553d2ffe6b67af2db41508 (patch) | |
tree | ab758e1bc9cff4765a2f38201a05ee9eade06cba | |
parent | 25616f3914ba5239616c45e0e23ee3365a8b4224 (diff) |
[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
-rw-r--r-- | clangd/CodeComplete.cpp | 5 |
1 files 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); |