ilya-biryukov added inline comments.

================
Comment at: clang-tools-extra/clangd/AST.cpp:57
+    return Func->getTemplateSpecializationArgsAsWritten()->arguments();
+  if (auto *Cls = llvm::dyn_cast<ClassTemplatePartialSpecializationDecl>(&ND))
+    return Cls->getTemplateArgsAsWritten()->arguments();
----------------
For `ClassTemplateSpecializationDecl`, could we try extracting the arguments 
from the result of `getTypeAsWritten`?


================
Comment at: clang/lib/AST/TypePrinter.cpp:1636
+static void printArgument(const TemplateArgument &A,
+                                const PrintingPolicy &PP,
+                                llvm::raw_ostream &OS) {
----------------
NIT: clang-format the diff


================
Comment at: clang/lib/AST/TypePrinter.cpp:1644
+                                llvm::raw_ostream &OS) {
+  A.getTypeSourceInfo()->getType().print(OS, PP);
+}
----------------
Maybe print the result of `getTypeLoc()` here, if it's available?
Would produce results closer to the ones written in the code.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59354/new/

https://reviews.llvm.org/D59354



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to