alexfh accepted this revision.
alexfh added a comment.
This revision is now accepted and ready to land.

Looks good. A couple of comments.

I'm happy to commit the patch for you once you answer the comments.

Thank you for the work!


================
Comment at:  clang-tidy/readability/DeletedDefaultCheck.cpp:36
@@ +35,3 @@
+}
+
+void DeletedDefaultCheck::check(const MatchFinder::MatchResult &Result) {
----------------
I would at least join matchers, since, I believe, it might be more effective 
that way. 

    cxxMethodDecl(anyOf(cxxConstructorDecl().bind("constructor"),
                                         isCopyAssignmentOperator(),
                                         isMoveAssignmentOperator()),
                                   isBadlyDefaulted)
                         .bind("assignment")

Optionally, you might want to inline the `isBadlyDefaulted` matcher (without 
the external `allOf` matcher).

As for restructuring the `check()` method, I don't insist.


================
Comment at:  clang-tidy/readability/DeletedDefaultCheck.cpp:49
@@ +48,3 @@
+              "constructor";
+      return;
+    }
----------------
If you don't feel strongly, I'd mildly suggest to turn `if { ... return }` to a 
chain of `if/else` (also the top-level ones). The code will become denser, but 
it will be easier to see the whole logic in a glance.


http://reviews.llvm.org/D18961



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to