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/



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to