Eugene.Zelenko added inline comments.

================
Comment at: clangd/AST.cpp:86
   else if (auto *Cls = llvm::dyn_cast<ClassTemplateSpecializationDecl>(&ND)) {
-    if (auto STL = Cls->getTypeAsWritten()
-                       ->getTypeLoc()
-                       .getAs<TemplateSpecializationTypeLoc>()) {
-      llvm::SmallVector<TemplateArgumentLoc, 8> ArgLocs;
-      ArgLocs.reserve(STL.getNumArgs());
-      for (unsigned I = 0; I < STL.getNumArgs(); ++I)
-        ArgLocs.push_back(STL.getArgLoc(I));
-      printTemplateArgumentList(OS, ArgLocs, Policy);
+    if (auto *TSI = Cls->getTypeAsWritten()) {
+      if (auto STL = TSI->getTypeLoc().getAs<TemplateSpecializationTypeLoc>()) 
{
----------------
Return type is not obvious, so auto should not be used.


Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D59599



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

Reply via email to