[PATCH] D41345: [clangd] Add more symbol information for code completion.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 9 09:13:21 PST 2018
sammccall accepted this revision.
sammccall added inline comments.
================
Comment at: clangd/index/SymbolYAML.cpp:78
+ assert(io.getContext());
+ Detail = static_cast<llvm::BumpPtrAllocator *>(io.getContext())
+ ->Allocate<Symbol::Details>();
----------------
this removes the Detail object if it's empty - this seems maybe unneccesary and certainly the wrong layer. It seems enough to do
if (!outputting)
Detail = (allocate)
else if (!Detail)
return;
io.mapOptional("Documentation", Detail->Documentation);
// etc
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D41345
More information about the cfe-commits
mailing list