================
@@ -6033,6 +6033,26 @@ static QualType getIntTypeForBitwidthOrBitInt(ASTContext 
&C, unsigned Bits,
   return Ty;
 }
 
+static Expr *buildInitListValue(Sema &SemaRef, Expr *E) {
+  auto *ILE = dyn_cast<InitListExpr>(E);
+  if (!ILE)
+    return E;
+  if (ILE->isTransparent())
+    return buildInitListValue(SemaRef, ILE->getInit(0));
+  ASTContext &Context = SemaRef.Context;
+  QualType Ty = ILE->getType();
+  bool IsEmptyScalar = ILE->getNumInits() == 0 && Ty->isScalarType();
+  if (!SemaRef.getLangOpts().CPlusPlus)
+    return IsEmptyScalar ? new (Context) ImplicitValueInitExpr(Ty) : E;
----------------
akash-manna-sky wrote:

Removed, the value now comes from Sema (`BuildCXXTypeConstructExpr` in C++, 
`PerformImplicitConversion` of `0` in C). That was a short cut. 


https://github.com/llvm/llvm-project/pull/233248
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to