[LLVMdev] Do we still need LLVM_HAS_INITIALIZER_LISTS?

Aaron Ballman aaron at aaronballman.com
Wed Feb 18 05:09:03 PST 2015


On Wed, Feb 18, 2015 at 7:23 AM, Sebastian Redl
<sebastian.redl at getdesigned.at> wrote:
>
> On 2/17/2015 4:39 PM, Aaron Ballman wrote:
>>
>> I think we're safe to use it. I've made an experimental commit in
>> r229502 to see if any of the bots complain, and will revert if they
>> do. Otherwise, I think we're good to go.
>>
> One specific thing doesn't work: in-class initializers with brace syntax:
>
> class Foo
> {
>   Bar bar{1, 2, 3};
> };
>
> They disabled this due to a silent wrong-code bug.

That's good to know, but also a coding style that we don't use (copy
initialization using = is preferred to direct initialization using {},
from what I learned recently). We should document both things in our
guidelines, though.

Thanks!

~Aaron



More information about the llvm-dev mailing list