[PATCH] D40580: [clang-tidy] Adding Fuchsia checker for multiple inheritance
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 19 05:43:33 PST 2018
aaron.ballman accepted this revision.
aaron.ballman added a comment.
LGTM aside from a few small nits.
================
Comment at: clang-tidy/fuchsia/MultipleInheritanceCheck.cpp:85
+void MultipleInheritanceCheck::registerMatchers(MatchFinder *Finder) {
+ // Match declarations which have bases.
+ Finder->addMatcher(cxxRecordDecl(hasBases()).bind("decl"), this);
----------------
No need to register the matchers for languages other than C++.
================
Comment at: clang-tidy/fuchsia/MultipleInheritanceCheck.cpp:113-114
+ diag(D->getLocStart(),
+ "inheriting mulitple classes which aren't "
+ "pure virtual is discouraged");
+ }
----------------
s/which/that
https://reviews.llvm.org/D40580
More information about the cfe-commits
mailing list