[PATCH] D44567: [clangd] Handle multiple callbacks from Sema's completion
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 16 07:42:56 PDT 2018
sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clangd/CodeComplete.cpp:454
+ if (CCSema) {
+ log(llvm::formatv("ProcessCodeCompleteResults called multiple times."
+ "Previous ContextKind: '{0}'. New ContextKind: '{1}'",
----------------
Suggest some hint in the log that helps readers who don't know the code structure. (It's easy to find the code structure by searching.
E.g. "Multiple code complete callbacks (parser backtracked?). Dropping results from context {0}, keeping results from {1}."
================
Comment at: unittests/clangd/CodeCompleteTests.cpp:623
+
+ Results = completions(R"cpp(
+ struct FooBarBaz {};
----------------
dead code? delete it or add an assertion
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D44567
More information about the cfe-commits
mailing list