Re: [PATCH] D20857: [clang-tidy] Add modernize-explicit-operator-bool check.

2016-07-22 Thread Murray Cumming via cfe-commits
murrayc added inline comments. Comment at: clang-tidy/modernize/ExplicitOperatorBoolCheck.cpp:38 @@ +37,3 @@ + Finder->addMatcher( + cxxConversionDecl(returns(booleanType()), unless(isExplicit())) + .bind("operator-bool"), alexfh wrote: > Please mer

Re: [PATCH] D20857: [clang-tidy] Add modernize-explicit-operator-bool check.

2016-06-30 Thread Murray Cumming via cfe-commits
murrayc added a comment. I'd still be perfectly happy if just the simple check for implicit operator bool was accepted. http://reviews.llvm.org/D20857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/lis

Re: [PATCH] D20857: [clang-tidy] Add modernize-explicit-operator-bool check.

2016-06-30 Thread Murray Cumming via cfe-commits
murrayc updated this revision to Diff 62355. murrayc marked an inline comment as done. murrayc added a comment. Same as previous patch, but with a tiny suggested whitespace corretion. http://reviews.llvm.org/D20857 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ExplicitOper

Re: [PATCH] D20857: [clang-tidy] Add modernize-explicit-operator-bool check.

2016-06-04 Thread Murray Cumming via cfe-commits
murrayc added a comment. In http://reviews.llvm.org/D20857#449080, @alexfh wrote: > Looks like a useful check to have. I'm not sure though, that it has anything > to do with "modernize". I'd suggest adding a new "bugprone" module (should be > added by http://reviews.llvm.org/D18821, hopefully s

Re: [PATCH] D20857: [clang-tidy] Add modernize-explicit-operator-bool check.

2016-06-03 Thread Murray Cumming via cfe-commits
murrayc updated this revision to Diff 59537. murrayc added a comment. Combined into one check. Also specifies C++11 for the test. http://reviews.llvm.org/D20857 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ExplicitOperatorBoolCheck.cpp clang-tidy/modernize/ExplicitOpera

Re: [PATCH] D20857: [clang-tidy] Add modernize-explicit-operator-bool check.

2016-06-02 Thread Murray Cumming via cfe-commits
murrayc added inline comments. Comment at: clang-tidy/modernize/OperatorVoidPointerCheck.cpp:27 @@ +26,3 @@ + Finder->addMatcher(cxxConversionDecl(returns(pointerType(pointee( + isConstQualified(), voidType(, +

Re: [PATCH] D20857: [clang-tidy] Add modernize-explicit-operator-bool check.

2016-06-02 Thread Murray Cumming via cfe-commits
murrayc added a comment. 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? http://reviews.llvm.org/D20857 ___ cfe-

Re: [PATCH] D20857: [clang-tidy] Add modernize-explicit-operator-bool check.

2016-06-02 Thread Murray Cumming via cfe-commits
murrayc updated this revision to Diff 59367. murrayc added a comment. With suggested changes. Ran clang-format (LLVM style). Used voidType() matcher. http://reviews.llvm.org/D20857 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ExplicitOperatorBoolCheck.cpp clang-tidy/mod

Re: [PATCH] D20857: [clang-tidy] Add modernize-explicit-operator-bool check.

2016-06-02 Thread Murray Cumming via cfe-commits
murrayc added a comment. In http://reviews.llvm.org/D20857#446101, @etienneb wrote: > I wonder if these two checks should not be merge in one checker. Personally I find it cleaner to keep them separate, but I would be happy to combine them if that's wanted. I guessed that it would be easier to

Re: [PATCH] D20857: [clang-tidy] Add modernize-explicit-operator-bool check.

2016-06-02 Thread Murray Cumming via cfe-commits
murrayc updated this revision to Diff 59346. murrayc added a comment. These are the commits amended with the suggested changes. Many thanks for the suggestions. (I'm not quite sure what arcanist will do, so hopefully this will not create a mess.) http://reviews.llvm.org/D20857 Files: clang-