rsmith added inline comments.
================
Comment at: lib/CodeGen/CGExprConstant.cpp:675
+ // We have mixed types. Use a packed struct.
+ std::vector<llvm::Type *> Types;
+ Types.reserve(Elements.size());
----------------
rjmccall wrote:
> Why std::vector?
Only because this was extracted from the old version of the code. Switched to a
`SmallVector`.
================
Comment at: test/CodeGenCXX/cxx11-initializer-aggregate.cpp:83
+ struct S1 data_7[1024 * 1024 * 512] = {{0}};
+
+ // This variable must be initialized elementwise.
----------------
sepavloff wrote:
> Array definitions:
> ```
> char data_8[1000 * 1000 * 1000] = {};
> int (&&data_9)[1000 * 1000 * 1000] = {0};
> ```
> also compile successfully with this patch and hang compiler without it.
I added these test cases, thanks!
Repository:
rC Clang
https://reviews.llvm.org/D47166
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits