[clang-tools-extra] [clang-tidy] Correcting issues in `readability-implicit-bool-conversion` on C23 (PR #92241)
Piotr Zegar via cfe-commits
cfe-commits at lists.llvm.org
Tue May 21 11:49:44 PDT 2024
=?utf-8?q?Björn?= Svensson <bjorn.a.svensson at est.tech>,
=?utf-8?q?Björn?= Svensson <bjorn.a.svensson at est.tech>,
=?utf-8?q?Björn?= Svensson <bjorn.a.svensson at est.tech>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/92241 at github.com>
================
@@ -267,6 +275,10 @@ void ImplicitBoolConversionCheck::registerMatchers(MatchFinder *Finder) {
auto BoolXor =
binaryOperator(hasOperatorName("^"), hasLHS(ImplicitCastFromBool),
hasRHS(ImplicitCastFromBool));
+ auto ComparisonInCall =
+ allOf(hasParent(callExpr()),
+ has(binaryOperator(hasAnyOperatorName("==", "!="))));
----------------
PiotrZSL wrote:
has -> hasSourceExpression, and probably castExpr would be needed instead of allOf
https://github.com/llvm/llvm-project/pull/92241
More information about the cfe-commits
mailing list