[PATCH] D40580: [clang-tidy] Adding Fuchsia checker for multiple inheritance
Eugene Zelenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 28 16:10:18 PST 2017
Eugene.Zelenko added inline comments.
================
Comment at: clang-tidy/fuchsia/MultipleInheritanceCheck.cpp:76
+ for (const auto &I : Node->bases()) {
+ const RecordType *Ty = I.getType()->getAs<RecordType>();
+ assert(Ty && "RecordType of base class is unknown");
----------------
Could be const auto *.
================
Comment at: clang-tidy/fuchsia/MultipleInheritanceCheck.cpp:98
+void MultipleInheritanceCheck::check(const MatchFinder::MatchResult &Result) {
+ if (const CXXRecordDecl *D =
+ Result.Nodes.getNodeAs<CXXRecordDecl>("decl")) {
----------------
Could be const auto *.
================
Comment at: clang-tidy/fuchsia/MultipleInheritanceCheck.cpp:104
+ for (const auto &I : D->bases()) {
+ const RecordType *Ty = I.getType()->getAs<RecordType>();
+ assert(Ty && "RecordType of base class is unknown");
----------------
Could be const auto *.
================
Comment at: clang-tidy/fuchsia/MultipleInheritanceCheck.cpp:106
+ assert(Ty && "RecordType of base class is unknown");
+ CXXRecordDecl *Base = cast<CXXRecordDecl>(Ty->getDecl()->getDefinition());
+ if (!MultipleInheritanceCheck::isInterface(Base))
----------------
Could be const auto *.
https://reviews.llvm.org/D40580
More information about the cfe-commits
mailing list