njames93 added a comment. This fix has expanded from preventing the crash to adding support for `CXXFoldExpr` to misc-redundant-expression. Maybe rename the revision to explain that better. If that is the case then you may as well add a test case showing a redundant fold expression
================ Comment at: clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp:75 while (LeftIter != Left->child_end() && RightIter != Right->child_end()) { - if (!areEquivalentExpr(dyn_cast<Expr>(*LeftIter), + if (*LeftIter && *RightIter && + !areEquivalentExpr(dyn_cast<Expr>(*LeftIter), ---------------- What happens when `*LeftIter` is null, but `*RightIter` isn't or vice versa, That case should also return false. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80896/new/ https://reviews.llvm.org/D80896 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits