[PATCH] C99 partial re-initialization behavior (DR-253)
Richard Smith
richard at metafoo.co.uk
Thu Jun 4 23:33:48 PDT 2015
I think it might be possible to get rid of the `NoInitExpr` here, but let's not worry about that for now. Just a couple of comments and then we can go ahead with this.
================
Comment at: lib/CodeGen/CGExprConstant.cpp:865
@@ +864,3 @@
+ else
+ llvm_unreachable("other array types not implemented");
+
----------------
This case can actually happen; you can return `nullptr` (for now) if it does.
================
Comment at: lib/CodeGen/CGExprConstant.cpp:1125
@@ +1124,3 @@
+
+ llvm::Constant *EltInit = Base->getOperand(ElementNo);
+
----------------
There is no guarantee that the layout of `Base` matches that of the `InitListExpr`; you should check that here and bail out in that case.
http://reviews.llvm.org/D5789
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list