[clang] Fix an error introduced in #138518 (PR #142988)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 5 08:18:09 PDT 2025


================
@@ -2160,6 +2160,11 @@ ExprResult Sema::BuildCXXNew(SourceRange Range, bool UseGlobal,
            "paren init for non-call init");
     Exprs = MultiExprArg(List->getExprs(), List->getNumExprs());
   }
+  if (auto *List = dyn_cast_or_null<CXXParenListInitExpr>(Initializer)) {
----------------
erichkeane wrote:

```suggestion
  else if (auto *List = dyn_cast_or_null<CXXParenListInitExpr>(Initializer)) {
```

https://github.com/llvm/llvm-project/pull/142988


More information about the cfe-commits mailing list