[llvm] r229502 - I believe we no longer require LLVM_HAS_INITIALIZER_LISTS; it's supported in MSVC 2013 and GCC. Added a trivial test to ensure the ArrayRef initializer list constructor is called and behaves as expected.

Chandler Carruth chandlerc at google.com
Tue Feb 17 08:54:53 PST 2015


On Tue, Feb 17, 2015 at 7:37 AM, Aaron Ballman <aaron at aaronballman.com>
wrote:

> +TEST(ArrayRefTest, InitializerList) {
> +  ArrayRef<int> A{ 0, 1, 2, 3, 4 };
>

Please use the = { ... }; syntax instead. I'm strongly opposed to using {}
for direct initialization in essentially every case. Even when it's the
only way to make a construct compile, I would rather use a different
construct.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150217/288f4f64/attachment.html>


More information about the llvm-commits mailing list