[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 17 09:48:22 PST 2024


================
@@ -357,20 +360,22 @@ void ImplicitBoolConversionCheck::registerMatchers(MatchFinder *Finder) {
 
 void ImplicitBoolConversionCheck::check(
     const MatchFinder::MatchResult &Result) {
-
+  if(CheckConversionsToBool){
----------------
PiotrZSL wrote:

Wrong, place these things should be actually put into matcher in registerMatchers method, to speed up.

You got 2 calls to addMatcher, one in line 300, other in line 339, put those (with dependences to avoid unused local variables) into if's.

https://github.com/llvm/llvm-project/pull/120087


More information about the cfe-commits mailing list