================
@@ -3489,6 +3489,11 @@ class CompoundLiteralExpr : public Expr {
   /// The int part of the pair stores whether this expr is file scope.
   llvm::PointerIntPair<TypeSourceInfo *, 1, bool> TInfoAndScope;
   Stmt *Init;
+
+  /// Value of constant literals with static storage duration. Used only for
+  /// constant folding as CompoundLiteralExpr is not an ICE.
----------------
AaronBallman wrote:

A compound literal expression is an ICE in C though?

> An integer constant expression116) shall have integer type and shall only 
> have operands that are
integer constants, named and compound literal constants of integer type, 
character constants,
sizeof expressions whose results are integer constants, alignof expressions, 
and floating, named,
or compound literal constants of arithmetic type that are the immediate 
operands of casts. Cast
operators in an integer constant expression shall only convert arithmetic types 
to integer types,
except as part of an operand to the typeof operators, sizeof operator, or 
alignof operator.

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

Reply via email to