[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 15:58:33 PST 2017
Eugene.Zelenko added inline comments.
================
Comment at: clang-tidy/fuchsia/MultipleInheritanceCheck.cpp:21
+
+ AST_MATCHER(CXXRecordDecl, hasDefinition) {
+ if (!Node.hasDefinition())
----------------
Please reduce indentation level.
================
Comment at: clang-tidy/fuchsia/MultipleInheritanceCheck.cpp:58
+ // Interfaces should have exclusively pure methods.
+ for (auto method : Node->methods()) {
+ if (method->isUserProvided() && !method->isPure()) {
----------------
const auto?
================
Comment at: clang-tidy/fuchsia/MultipleInheritanceCheck.cpp:78
+ assert(Ty && "RecordType of base class is unknown");
+ CXXRecordDecl *Base = cast<CXXRecordDecl>(Ty->getDecl()->getDefinition());
+ if (!MultipleInheritanceCheck::isInterface(Base)) {
----------------
Could be (const?) auto *, since you spell type in cast. Same in other places.
================
Comment at: docs/ReleaseNotes.rst:60
+- New `fuchsia-multiple-inheritance
+ <http://clang.llvm.org/extra/clang-tidy/checks/fuchsia-default-arguments.html>`_ check
----------------
Please move it to previous fuchsia check in alphabetical order.
================
Comment at: docs/ReleaseNotes.rst:65
+
- New `objc-avoid-spinlock
<http://clang.llvm.org/extra/clang-tidy/checks/objc-avoid-spinlock.html>`_ check
----------------
Please move this in alphabetical order after renamed checks.
================
Comment at: docs/clang-tidy/checks/fuchsia-multiple-inheritance.rst:8
+
+For example, Declaring a class that inherits from multiple concrete classes is
+disallowed:
----------------
Declaring -> declaring
https://reviews.llvm.org/D40580
More information about the cfe-commits
mailing list