thakis added inline comments.
Comment at: clang-tools-extra/trunk/unittests/clangd/CMakeLists.txt:16
Annotations.cpp
+ PrintASTTests.cpp
BackgroundIndexTests.cpp
Keep alphabetized?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
This revision was automatically updated to reflect the committed changes.
Closed by commit rL358272: [clangd] Print template arguments helper (authored
by kadircet, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed prior to commit:
kadircet added inline comments.
Comment at: clang-tools-extra/clangd/AST.cpp:139
+ // location information.
+ printTemplateArgumentList(OS, Cls->getTemplateArgs().asArray(), Policy);
+}
ioeric wrote:
> Could you also add a test case for this with
kadircet updated this revision to Diff 194686.
kadircet marked 6 inline comments as done.
kadircet added a comment.
- Address comments
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59639/new/
https://reviews.llvm.org/D59639
Files:
ioeric accepted this revision.
ioeric added a comment.
This revision is now accepted and ready to land.
lgtm
Comment at: clang-tools-extra/clangd/AST.cpp:139
+ // location information.
+ printTemplateArgumentList(OS, Cls->getTemplateArgs().asArray(), Policy);
+}
kadircet updated this revision to Diff 194658.
kadircet added a comment.
- Update file comment for PrintASTTests.cpp
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59639/new/
https://reviews.llvm.org/D59639
Files:
kadircet added inline comments.
Comment at: clang-tools-extra/clangd/AST.cpp:133
+printTemplateArgumentList(OS, *Args, Policy);
+ else if (auto *Cls = llvm::dyn_cast()) {
+if (const TypeSourceInfo *TSI = Cls->getTypeAsWritten()) {
ioeric wrote:
>
kadircet updated this revision to Diff 194657.
kadircet marked 7 inline comments as done.
kadircet added a comment.
- Address comments
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59639/new/
https://reviews.llvm.org/D59639
Files:
ioeric added inline comments.
Comment at: clang-tools-extra/clangd/AST.cpp:149
+} else {
+ // FIXME: Fix cases when getTypeAsWritten returns null, e.g. friend
decls.
+ printTemplateArgumentList(OS, Cls->getTemplateArgs().asArray(), Policy);
I'm
Eugene.Zelenko added inline comments.
Comment at: clang-tools-extra/clangd/AST.cpp:26
+llvm::Optional>
+getTemplateSpecializationArgLocs(const NamedDecl ) {
+ if (auto *Func = llvm::dyn_cast()) {
ilya-biryukov wrote:
> Eugene.Zelenko wrote:
> > Functions should
kadircet updated this revision to Diff 191857.
kadircet marked an inline comment as done.
kadircet added a comment.
- Address comments
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59639/new/
https://reviews.llvm.org/D59639
Files:
kadircet marked 15 inline comments as done.
kadircet added inline comments.
Comment at: clang-tools-extra/clangd/AST.cpp:88
static const TemplateArgumentList *
getTemplateSpecializationArgs(const NamedDecl ) {
if (auto *Func = llvm::dyn_cast())
ioeric
ilya-biryukov added inline comments.
Comment at: clang-tools-extra/clangd/AST.cpp:26
+llvm::Optional>
+getTemplateSpecializationArgLocs(const NamedDecl ) {
+ if (auto *Func = llvm::dyn_cast()) {
Eugene.Zelenko wrote:
> Functions should be static, not in
ilya-biryukov added inline comments.
Comment at: clang-tools-extra/unittests/clangd/ASTUtilsTests.cpp:1
+#include "AST.h"
+#include "Annotations.h"
NIT: add a licence header
Comment at: clang-tools-extra/unittests/clangd/CMakeLists.txt:13
ioeric added inline comments.
Comment at: clang/lib/AST/TypePrinter.cpp:1640
+
+static void printArgument(const TemplateArgumentLoc ,
+ const PrintingPolicy , llvm::raw_ostream ) {
It's unclear to me what the new behavior is with changes
ioeric added inline comments.
Comment at: clang-tools-extra/clangd/AST.cpp:88
static const TemplateArgumentList *
getTemplateSpecializationArgs(const NamedDecl ) {
if (auto *Func = llvm::dyn_cast())
can we unify this with `getTemplateSpecializationArgLocs`
Eugene.Zelenko added inline comments.
Comment at: clang-tools-extra/clangd/AST.cpp:26
+llvm::Optional>
+getTemplateSpecializationArgLocs(const NamedDecl ) {
+ if (auto *Func = llvm::dyn_cast()) {
Functions should be static, not in anonymous namespace. See LLVM
kadircet created this revision.
kadircet added reviewers: ioeric, ilya-biryukov.
Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, mgorny.
Herald added a project: clang.
Prepares ground for printing template arguments as written in the
source code, part of re-landing rC356541
18 matches
Mail list logo