[clang] [Clang] Fix an assertion in expression recovery (PR #112888)
Shafik Yaghmour via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 18 11:37:06 PDT 2024
================
@@ -1989,7 +1989,7 @@ Expr *CastExpr::getSubExprAsWritten() {
SubExpr = IgnoreExprNodes(cast<CXXConstructExpr>(SubExpr)->getArg(0),
ignoreImplicitSemaNodes);
} else if (E->getCastKind() == CK_UserDefinedConversion) {
- assert((isa<CXXMemberCallExpr>(SubExpr) || isa<BlockExpr>(SubExpr)) &&
+ assert((isa<CallExpr, BlockExpr>(SubExpr)) &&
----------------
shafik wrote:
Curious what change loosened the criteria here so that we can't restrict to `CXXMemberCallExpr` or was it that the assert was always too strict?
https://github.com/llvm/llvm-project/pull/112888
More information about the cfe-commits
mailing list