================
@@ -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() ||
----------------
capitan-davide wrote:
Agree, IMO this more readable if we apply De Morgan here. We can even apply it
manually and the check won't complain any longer (so, we can keep the default
configuration in this case).
Before:
```c++
return !(!Lsr.getBegin().isMacroID() || E->isValueDependent() ||
!E->isIntegerConstantExpr(*AstCtx));
```
After:
```c++
return Lsr.getBegin().isMacroID() && !E->isValueDependent() &&
E->isIntegerConstantExpr(*AstCtx));
```
What do you think?
https://github.com/llvm/llvm-project/pull/158706
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits