[PATCH] D59640: [clangd] Add TemplateArgumentList into Symbol
Eric Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 21 10:42:33 PDT 2019
ioeric added a comment.
should we update YAML?
================
Comment at: clang-tools-extra/clangd/index/Symbol.h:48
+ /// non-specializations. Example: "<int, bool, 3>"
+ llvm::StringRef TemplateArgumentList;
/// The location of the symbol's definition, if one was found.
----------------
How about `TemplateSpecializationArgs`?
Could you also put this field near `ReturnType` or `Signature`?
================
Comment at: clang-tools-extra/clangd/index/SymbolCollector.cpp:526
S.ID = std::move(ID);
+ std::string TemplateArgumentList = printTemplateArgsAsWritten(ND);
+ S.TemplateArgumentList = TemplateArgumentList;
----------------
put this near `ReturnType` initialization.
================
Comment at: clang-tools-extra/unittests/clangd/SymbolCollectorTests.cpp:396
TEST_F(SymbolCollectorTest, Template) {
Annotations Header(R"(
----------------
this test is getting hard to read. could you only make minimum change to the existing test and add a new case for the new behavior?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59640/new/
https://reviews.llvm.org/D59640
More information about the cfe-commits
mailing list