[PATCH] D29393: [clang-tidy] Don't warn about call to unresolved operator*
Paweł Żukowski via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 4 00:37:39 PST 2017
idlecode added inline comments.
================
Comment at: clang-tidy/misc/UnconventionalAssignOperatorCheck.cpp:63
+ cxxOperatorCallExpr(argumentCountIs(1),
+ callee(unresolvedLookupExpr()),
+ hasArgument(0, cxxThisExpr())))))));
----------------
malcolm.parsons wrote:
> idlecode wrote:
> > Seems that it will catch all unary operators with ##this## as first argument.
> > e.g. in case `operator-` is defined somewhere, check will not warn about returning `-this`.
> > Do you think adding `hasOverloadedOperatorName("*")` for such abstract case is worth it?
> I'm just trying to suppress them warning from the template. The operator can be checked properly in an instantiation.
LGTM then :)
https://reviews.llvm.org/D29393
More information about the cfe-commits
mailing list