[PATCH] D96751: [clangd] Populate detail field in document symbols
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 18 07:33:29 PST 2021
sammccall accepted this revision.
sammccall added a comment.
Fantastic, thank you!
================
Comment at: clang-tools-extra/clangd/FindSymbols.cpp:189
+ if (isa<CXXConstructorDecl>(VD)) {
+ std::string CCD;
+ llvm::raw_string_ostream OSC(CCD);
----------------
I think equivalent and a little safer is
std::string ConstructorType = VD->getType().getAsString(P);
llvm::StringRef WithoutVoid = ConstructorType;
WithoutVoid.consume_front("void");
OS << WithoutVoid;
(I'll apply this when landing)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96751/new/
https://reviews.llvm.org/D96751
More information about the cfe-commits
mailing list