Added more checks.
Also fixed assigning by-value and assigning from a different type. Those are ok.
================
Comment at: clang-tidy/google/AssignOperatorSignatureCheck.cpp:23
@@ +22,3 @@
+ Finder->addMatcher(
+ methodDecl(unless(isDeleted()), unless(isPrivate()),
hasName("operator="),
+ ofClass(recordDecl().bind("class")),
----------------
alexfh wrote:
> I guess you missed "unless(isImplicit())" (and a test for it). And maybe also
> unless(isInTemplateInstantiation()) (especially, if you would want to provide
> a fixit for the "const T& operator=(const T&)" case).
I could add unless(isImplicit()), but the implicit one will have the right
signature, so it shouldn't match anyway.
================
Comment at: clang-tidy/google/AssignOperatorSignatureCheck.h:25
@@ +24,3 @@
+public:
+ using ClangTidyCheck::ClangTidyCheck;
+ void registerMatchers(ast_matchers::MatchFinder *Finder) override;
----------------
alexfh wrote:
> Unfortunately, this needs to be done the old way. LLVM supports MSVS 2013
> which doesn't support this form of constructor delegation.
Done.
http://reviews.llvm.org/D6667
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits