[PATCH] D25654: [Sema] Don't perform aggregate initialization for types with explicit constructors

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 17 13:23:03 PST 2016


EricWF updated this revision to Diff 78410.
EricWF added a comment.

OK, I've applied the fix to C++11 and C++14. Although the inheriting-constructor part still only matters in C++1z since it requires having base classes.

I also fixed aggregate initialization for types with non-aggregate base classes. For example:

  struct A { A(int); };
  struct B : A {};
  B b = {42}; // OK in C++1z


https://reviews.llvm.org/D25654

Files:
  lib/AST/DeclCXX.cpp
  test/CXX/dcl.decl/dcl.init/dcl.init.aggr/p1.cpp
  test/CXX/drs/dr15xx.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25654.78410.patch
Type: text/x-patch
Size: 5795 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161117/79173ab8/attachment.bin>


More information about the cfe-commits mailing list