alexfh added inline comments.
================
Comment at: clang-tidy/readability/DeletedDefaultCheck.cpp:28
@@ +27,3 @@
+ // - actually deleted
+ // - not in template instantiation.
+ const auto isBadlyDefaulted =
----------------
For decls there is `isInstantiated()`, which is defined as:
auto IsInstantiation = decl(anyOf(cxxRecordDecl(isTemplateInstantiation()),
functionDecl(isTemplateInstantiation())));
return decl(anyOf(IsInstantiation, hasAncestor(IsInstantiation)));
and should be just what you need.
================
Comment at: clang-tidy/readability/DeletedDefaultCheck.cpp:35
@@ +34,3 @@
+ this);
+ Finder->addMatcher(cxxMethodDecl(anyOf(isCopyAssignmentOperator(),
+ isMoveAssignmentOperator()),
----------------
It's not overly important, but you can further reduce the code by folding the
first matcher into the second one (move `cxxConstructorDecl()` inside `anyOf`
here, since `CXXConstructorDecl` is a `CXXMethodDecl`). You can also use just a
single id to bind the node and distinguish the constructor using `dyn_cast`.
Then you'll be able to use a single `diag()` call below and remove the unneeded
variables `Message` and `isBadlyDefaulted`.
http://reviews.llvm.org/D18961
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits