================
@@ -1038,11 +1038,14 @@ void CodeGenFunction::EmitNewArrayInitializer(
     return true;
   };
 
+  const InitListExpr *ILE = dyn_cast<InitListExpr>(Init);
+  const CXXParenListInitExpr *CPLIE = dyn_cast<CXXParenListInitExpr>(Init);
+  const StringLiteral *SL = dyn_cast<StringLiteral>(Init);
   // If the initializer is an initializer list, first do the explicit elements.
-  if (const InitListExpr *ILE = dyn_cast<InitListExpr>(Init)) {
+  if (ILE || CPLIE || SL) {
----------------
efriedma-quic wrote:

Sure, but have you tried, for example, `char* x = new char[](__extension__ 
"asdf");`.  Or in objective-c++ mode, `char* x = new char[](@encode(int));`

https://github.com/llvm/llvm-project/pull/76976
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to