[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
Fri Jun 22 03:33:45 PDT 2018
sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clangd/SourceCode.h:60
+/// Splits the qualified name of ND. The scope doesn't contain unwritten scopes
+/// like inline namespaces.
----------------
This is a bit non-orthogonal: the printing of the qname doesn't have much to do with splitting it.
Also, the printing doesn't really belong in SourceCode.h as it's basically AST manipulation.
What about adding e.g. `printQualifiedName` to AST.h, and calling `splitQualifiedName(printQualifiedName(ND))`?(
================
Comment at: unittests/clangd/CodeCompleteTests.cpp:47
MATCHER_P(Named, Name, "") { return arg.insertText == Name; }
+MATCHER_P(QName, Name, "") {
+ return (arg.SymbolScope + arg.filterText) == Name;
----------------
maybe test scope explicitly/directly?
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D48425
More information about the cfe-commits
mailing list