[PATCH] D48425: [clangd] Expose qualified symbol names in CompletionItem (C++ structure only, no json).
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 21 08:09:01 PDT 2018
sammccall added inline comments.
================
Comment at: clangd/CodeComplete.cpp:246
assert(bool(SemaResult) == bool(SemaCCS));
+ assert(bool(SemaResult) || bool(IndexResult));
+
----------------
can skip the bool() here if you like
================
Comment at: clangd/Protocol.h:743
+ /// FIXME: find a more precise way to identify a completion item.
+ std::string QualifiedSymbolName;
};
----------------
So this is always set to scope + filterText (except for non-decl completions, where you're not setting it in this patch).
WDYT about just making that "scope", and for now relying on the fact that scope + filtertext gives you a nice readable name?
Advantages:
- it's a bit smaller
- as we add more structure to the C++ completion API, I think we'll want to expose scope+name split, so this would be closer to the desired state.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D48425
More information about the cfe-commits
mailing list