[cfe-commits] r147271 - in /cfe/trunk: lib/AST/ExprConstant.cpp lib/AST/Type.cpp test/CXX/expr/expr.const/p2-0x.cpp test/CXX/special/class.ctor/p6-0x.cpp test/CodeGenCXX/value-init.cpp test/SemaCXX/constexpr-printing.cpp test/SemaCXX/constexpr-value-init.cpp test/SemaObjCXX/arc-type-traits.mm

Richard Smith richard at metafoo.co.uk
Fri Dec 30 09:01:08 PST 2011

On Fri, December 30, 2011 03:25, Rafael Ávila de Espíndola wrote:
> On 25/12/11 03:00 PM, Richard Smith wrote:
>> Author: rsmith
>> Date: Sun Dec 25 14:00:17 2011
>> New Revision: 147271
>> URL: http://llvm.org/viewvc/llvm-project?rev=147271&view=rev
>> Log:
>> constexpr: perform zero-initialization prior to / instead of performing a
>> constructor call when appropriate. Thanks to Eli for spotting this.
> Hi Richard,
> This caused PR11676, so I reverted it for now. I also added the test
> from the PR to test/CodeGenCXX/pr11676.cpp.

Thanks, I'll look into this.

Just as a heads-up, your test case is currently set to become ill-formed in
C++11 mode. The implicit default constructor of an empty union is defined as
deleted (because it has no non-const-qualified members), and
value-initialization can't be performed on a class type with a deleted default
constructor (under the resolution of DR1301, which we don't yet implement).

- Richard

More information about the cfe-commits mailing list