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

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 17 11:37:38 PST 2016


rsmith added inline comments.


================
Comment at: lib/AST/DeclCXX.cpp:564
+    // C++1z [dcl.init.aggr]p1:
+    //  - no user-provided, explicit, or inherited constructors,
+    if (getASTContext().getLangOpts().CPlusPlus1z && Constructor->isExplicit())
----------------
rsmith wrote:
> Do we correctly handle the "or inherited" part? I'd also like to find out whether core intended for this issue to be treated as a DR or not (if so, this should apply all the way back to C++11).
According to the current issues list, this issue is in DRWP status, so this change should be applied retroactively to C++11 and C++14 as well.


https://reviews.llvm.org/D25654





More information about the cfe-commits mailing list