Eugene.Zelenko added inline comments.
================ Comment at: clang-tools-extra/clang-doc/Serialize.cpp:182 static RecordDecl *getDeclForType(const QualType &T) { - auto *Ty = T->getAs<RecordType>(); - if (!Ty) - return nullptr; - return Ty->getDecl()->getDefinition(); + if (const auto *D = T->getAsRecordDecl()) + return D->getDefinition(); ---------------- Please don't use auto because type is not spelled in same statement. ================ Comment at: clang-tools-extra/clang-doc/Serialize.cpp:252 + if (const auto *Ty = B.getType()->getAs<TemplateSpecializationType>()) { + const auto *D = Ty->getTemplateName().getAsTemplateDecl(); + I.Parents.emplace_back(getUSRForDecl(D), B.getType().getAsString(), ---------------- Please don't use auto because type is not spelled in same statement. ================ Comment at: clang-tools-extra/clang-doc/Serialize.cpp:255 + InfoType::IT_record); + } else if (const auto *P = getDeclForType(B.getType())) I.Parents.emplace_back(getUSRForDecl(P), P->getNameAsString(), ---------------- Please don't use auto because type is not spelled in same statement. ================ Comment at: clang-tools-extra/clang-doc/Serialize.cpp:350 + if (const auto *C = dyn_cast<CXXRecordDecl>(D)) { + if (const auto *TD = C->getTypedefNameForAnonDecl()) { + I->Name = TD->getNameAsString(); ---------------- Please don't use auto because type is not spelled in same statement. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63367/new/ https://reviews.llvm.org/D63367 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits