[clang-tools-extra] [clang-tidy][NFC] Enable 'readability-simplify-boolean-expr' check (PR #158706)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 6 13:56:18 PDT 2025


================
@@ -747,10 +742,8 @@ static bool areSidesBinaryConstExpressionsOrDefinesOrIntegerConstant(
 
   auto IsDefineExpr = [AstCtx](const Expr *E) {
     const SourceRange Lsr = E->getSourceRange();
-    if (!Lsr.getBegin().isMacroID() || E->isValueDependent() ||
-        !E->isIntegerConstantExpr(*AstCtx))
-      return false;
-    return true;
+    return !(!Lsr.getBegin().isMacroID() || E->isValueDependent() ||
----------------
vbvictor wrote:

Sorry for late reply, IMO DE-morgan looks better here. We could try it (I see there are places that it could be applied)

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


More information about the cfe-commits mailing list