[PATCH] C99 partial re-initialization behavior (DR-253)

Richard Smith richard at metafoo.co.uk
Mon Oct 20 16:57:05 PDT 2014


The right way to deal with this is to expand initializers like `{ "foo" }` to `{ 'f', 'o', 'o' }` in the structured form of the `InitListExpr` if a designator tries to replace an element of the list.

================
Comment at: llvm/tools/clang/include/clang/AST/Expr.h:3784
@@ +3783,3 @@
+  // evaluation results will be stored into their PrevInitConstant members.
+  llvm::Constant *PrevInitConstant;
+  Expr *PrevInitExpr;
----------------
This is a huge and unacceptable layering violation. It is not OK for the AST to refer to IR-level constructs.

http://reviews.llvm.org/D5789






More information about the llvm-commits mailing list