What about `virtual T& operator=(const T&);`? It looks like a bad pattern, IMHO.
Also, it looks like the check is not specific to Google and it's not exactly
about readability. Maybe move it to misc/?
================
Comment at: clang-tidy/google/AssignOperatorSignatureCheck.cpp:23
@@ +22,3 @@
+ Finder->addMatcher(
+ methodDecl(unless(isDeleted()), unless(isPrivate()),
hasName("operator="),
+ ofClass(recordDecl().bind("class")),
----------------
sbenza wrote:
> 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.
Reasonable. Maybe a comment would not be useless.
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