[PATCH] D91037: [clang-tidy] Fix crash in bugprone-redundant-branch-condition on ExprWithCleanups
Zinovy Nis via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 10 22:12:31 PST 2020
zinovy.nis marked 2 inline comments as done.
zinovy.nis added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/bugprone/RedundantBranchConditionCheck.cpp:145
+
const auto *LeftDRE =
dyn_cast<DeclRefExpr>(CondOp->getLHS()->IgnoreParenImpCasts());
----------------
aaron.ballman wrote:
> The old code used to assert that `CondOp` was a `BinaryOperator` but the new code means that `CondOp` can be null -- should you add an `assert` in to ensure we have a valid `CondOp` still or will that assert trigger on some constructs?
Reverted to `cast`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91037/new/
https://reviews.llvm.org/D91037
More information about the cfe-commits
mailing list