[clang-tools-extra] [clang-tidy] Address false positives in misc-redundant-expression checker (PR #121960)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 8 08:21:08 PST 2025
================
@@ -747,6 +747,31 @@ static bool areSidesBinaryConstExpressions(const BinaryOperator *&BinOp, const A
return false;
}
+static bool
+areSidesBinaryConstExpressionsOrDefines(const BinaryOperator *&BinOp,
+ const ASTContext *AstCtx) {
+ if (areSidesBinaryConstExpressions(BinOp, AstCtx))
+ return true;
+
+ const auto *Lhs = BinOp->getLHS();
----------------
EugeneZelenko wrote:
Please do no use `auto` when type is not spelled explicitly in same statement or iterator. Same below.
https://github.com/llvm/llvm-project/pull/121960
More information about the cfe-commits
mailing list