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
https://reviews.llvm.o
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:
https://reviews.ll
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 th
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:
clang-tools-ex
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:
clang-tools-extra/clangd/AST.cpp
kadircet added inline comments.
Comment at: clang-tools-extra/clangd/AST.cpp:133
+printTemplateArgumentList(OS, *Args, Policy);
+ else if (auto *Cls = llvm::dyn_cast(&ND)) {
+if (const TypeSourceInfo *TSI = Cls->getTypeAsWritten()) {
ioeric wrote:
> kadi
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:
clang-tools-ex
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 not
Eugene.Zelenko added inline comments.
Comment at: clang-tools-extra/clangd/AST.cpp:26
+llvm::Optional>
+getTemplateSpecializationArgLocs(const NamedDecl &ND) {
+ if (auto *Func = llvm::dyn_cast(&ND)) {
ilya-biryukov wrote:
> Eugene.Zelenko wrote:
> > Functions s
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:
clang-tools-ex
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 &ND) {
if (auto *Func = llvm::dyn_cast(&ND))
ioeric
ilya-biryukov added inline comments.
Comment at: clang-tools-extra/clangd/AST.cpp:26
+llvm::Optional>
+getTemplateSpecializationArgLocs(const NamedDecl &ND) {
+ if (auto *Func = llvm::dyn_cast(&ND)) {
Eugene.Zelenko wrote:
> Functions should be static, not in an
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
An
ioeric added inline comments.
Comment at: clang/lib/AST/TypePrinter.cpp:1640
+
+static void printArgument(const TemplateArgumentLoc &A,
+ const PrintingPolicy &PP, llvm::raw_ostream &OS) {
It's unclear to me what the new behavior is with
ioeric added inline comments.
Comment at: clang-tools-extra/clangd/AST.cpp:88
static const TemplateArgumentList *
getTemplateSpecializationArgs(const NamedDecl &ND) {
if (auto *Func = llvm::dyn_cast(&ND))
can we unify this with `getTemplateSpecializationArgL
Eugene.Zelenko added inline comments.
Comment at: clang-tools-extra/clangd/AST.cpp:26
+llvm::Optional>
+getTemplateSpecializationArgLocs(const NamedDecl &ND) {
+ if (auto *Func = llvm::dyn_cast(&ND)) {
Functions should be static, not in anonymous namespace. See
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