Eugene.Zelenko added inline comments.
================ Comment at: clang-tools-extra/clang-tidy/performance/TriviallyDestructibleCheck.cpp:29 + // Check direct base classes. + const auto *RecordDecl = Dtor->getParent(); + for (auto *Field : RecordDecl->fields()) { ---------------- Please don't use auto unless type is spelled in same statement or iterator. ================ Comment at: clang-tools-extra/clang-tidy/performance/TriviallyDestructibleCheck.cpp:31 + for (auto *Field : RecordDecl->fields()) { + const auto FieldType = Field->getType(); + if (FieldType->isDependentType() || ---------------- Please don't use auto unless type is spelled in same statement or iterator. ================ Comment at: clang-tools-extra/clang-tidy/performance/TriviallyDestructibleCheck.cpp:38 + for (const auto &BaseSpec : RecordDecl->bases()) { + const auto BaseType = BaseSpec.getType(); + if (BaseType->isDependentType() || ---------------- Please don't use auto unless type is spelled in same statement or iterator. ================ Comment at: clang-tools-extra/clang-tidy/performance/TriviallyDestructibleCheck.cpp:61 + const auto *FirstDecl = cast<CXXMethodDecl>(MatchedDecl->getFirstDecl()); + const auto FirstDeclRange = clang::CharSourceRange::getCharRange( + FirstDecl->getBeginLoc(), ---------------- Please don't use auto unless type is spelled in same statement or iterator. ================ Comment at: clang-tools-extra/clang-tidy/performance/TriviallyDestructibleCheck.cpp:66 + /*SkipTrailingWhitespaceAndNewLine=*/true)); + const auto SecondDeclRange = clang::CharSourceRange::getTokenRange( + MatchedDecl->getBeginLoc(), ---------------- Please don't use auto unless type is spelled in same statement or iterator. ================ Comment at: clang-tools-extra/docs/ReleaseNotes.rst:133 +- New :doc:`performance-trivially-destructible + <clang-tidy/checks/performance-trivially-destructible>` check. ---------------- Please move into new checks list (in alphabetical order). Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69435/new/ https://reviews.llvm.org/D69435 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits