This revision was automatically updated to reflect the committed changes.
Closed by commit rC356541: [clangd] Print arguments in template specializations
(authored by kadircet, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D59354?vs=191460&id=191462#toc
Repository:
rC Cla
kadircet updated this revision to Diff 191460.
kadircet marked 2 inline comments as done.
kadircet added a comment.
- Address comments
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59354/new/
https://reviews.llvm.org/D59354
Files:
clang-tools-ex
ilya-biryukov added inline comments.
Comment at: clang/lib/AST/TypePrinter.cpp:1635
+static void printArgument(const TemplateArgument &A, const PrintingPolicy &PP,
+ llvm::raw_ostream &OS) {
ilya-biryukov wrote:
> NIT: consider also add
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LGTM with a few NITs.
Thanks for fixing this!
Comment at: clang-tools-extra/clangd/AST.cpp:86
+auto TL = Cls->getTypeAsWritten()->getTypeLoc();
+if (aut
kadircet updated this revision to Diff 190800.
kadircet marked 11 inline comments as done.
kadircet added a comment.
- Add more tests
- Replace switch with if
- Use SmallVector
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59354/new/
https://review
kadircet added inline comments.
Comment at: clang/lib/AST/TypePrinter.cpp:1655
+ case TemplateArgument::ArgKind::Expression:
+ case TemplateArgument::ArgKind::Pack:
+A.getArgument().print(PP, OS);
ilya-biryukov wrote:
> Now that you mentioned other kinds of
ilya-biryukov added inline comments.
Comment at: clang/lib/AST/TypePrinter.cpp:1644
+llvm::raw_ostream &OS) {
+ A.getTypeSourceInfo()->getType().print(OS, PP);
+}
kadircet wrote:
> ilya-biryukov wrote:
> > kadircet wrote:
> > > il
ilya-biryukov added a comment.
The only important comment is about test coverage
Comment at: clang-tools-extra/clangd/AST.cpp:84
+if (auto STL = TL.getAs()) {
+ std::vector ArgLocs;
+ for (unsigned I = 0; I < STL.getNumArgs(); I++)
kadircet wrote:
kadircet marked an inline comment as done.
kadircet added inline comments.
Comment at: clang/lib/AST/TypePrinter.cpp:1646
+break;
+ case TemplateArgument::ArgKind::Type:
+A.getTypeSourceInfo()->getType().print(OS, PP);
ilya-biryukov wrote:
> Maybe simpli
kadircet marked 7 inline comments as done.
kadircet added inline comments.
Comment at: clang-tools-extra/clangd/AST.cpp:84
+if (auto STL = TL.getAs()) {
+ std::vector ArgLocs;
+ for (unsigned I = 0; I < STL.getNumArgs(); I++)
ilya-biryukov wrote:
>
kadircet updated this revision to Diff 190642.
kadircet marked 2 inline comments as done.
kadircet added a comment.
- Address some of the comments
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59354/new/
https://reviews.llvm.org/D59354
Files:
cl
ilya-biryukov added a comment.
Mostly nits, but could you elaborate why can't we print the type-loc when
printing the template argument (see the corresponding comment)?
Comment at: clang-tools-extra/clangd/AST.cpp:66
+return Var->getTemplateArgsInfo().arguments();
+ retur
kadircet updated this revision to Diff 190624.
kadircet added a comment.
- Get rid of debug printing
- Update tests
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59354/new/
https://reviews.llvm.org/D59354
Files:
clang-tools-extra/clangd/AST.cpp
kadircet added inline comments.
Comment at: clang/lib/AST/TypePrinter.cpp:1644
+llvm::raw_ostream &OS) {
+ A.getTypeSourceInfo()->getType().print(OS, PP);
+}
ilya-biryukov wrote:
> Maybe print the result of `getTypeLoc()` here, if
kadircet updated this revision to Diff 190617.
kadircet marked 3 inline comments as done.
kadircet added a comment.
Herald added a subscriber: jdoerfert.
- Address comments
- Add template specializations to fuzzyFind results
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
http
ilya-biryukov added inline comments.
Comment at: clang-tools-extra/clangd/AST.cpp:57
+return Func->getTemplateSpecializationArgsAsWritten()->arguments();
+ if (auto *Cls = llvm::dyn_cast(&ND))
+return Cls->getTemplateArgsAsWritten()->arguments();
For `Cl
kadircet created this revision.
kadircet added a reviewer: ilya-biryukov.
Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ioeric.
Herald added a project: clang.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D59354
Files:
clang-tools-extra/clangd/AST.cpp
cl
17 matches
Mail list logo