[PATCH] D20857: [clang-tidy] Add modernize-explicit-operator-bool check.
Etienne Bergeron via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 2 05:36:42 PDT 2016
etienneb added a comment.
In http://reviews.llvm.org/D20857#446784, @murrayc wrote:
> In http://reviews.llvm.org/D20857#446732, @etienneb wrote:
>
> > Enabling/disabling can be done with options (see SizeofExpressionCheck).
>
>
> Thanks. Am I being asked to combine the checks?
I'll let alexfh@ take decision. He will maintain this code.
It's a matter of preference, and not a blocker to me.
I can still help you to make it conform to the coding style.
================
Comment at: clang-tidy/modernize/OperatorVoidPointerCheck.cpp:27
@@ +26,3 @@
+ Finder->addMatcher(cxxConversionDecl(returns(pointerType(pointee(
+ isConstQualified(), voidType()))),
+ unless(isExplicit()))
----------------
I'm curious, why: isConstQualified() ?
I'm probably missing something.
================
Comment at: clang-tidy/modernize/OperatorVoidPointerCheck.cpp:40
@@ +39,3 @@
+
+ // FIXME: This tries to change the type and add explicit, but
+ // MatchedDecl->getTypeSpecStartLoc() gets the start of void, not the start
----------------
The FIXME only apply to the fixtit statements.
<< FIxItHint(...)
you can still output a diag message.
http://reviews.llvm.org/D20857
More information about the cfe-commits
mailing list