MitalAshok added inline comments.
================ Comment at: clang/lib/Sema/SemaInit.cpp:4249-4250 InitializedEntity::EK_LambdaToBlockConversionBlockElement && - UnwrappedArgs.size() == 1 && UnwrappedArgs[0]->isPRValue() && - S.Context.hasSameUnqualifiedType(UnwrappedArgs[0]->getType(), DestType)) { + Args.size() == 1 && Args[0]->isPRValue() && + S.Context.hasSameUnqualifiedType(Args[0]->getType(), DestType)) { // Convert qualifications if necessary. ---------------- MitalAshok wrote: > This change unfortunately exposes the still-open [[ https://wg21.link/CWG2311 > | CWG2311 ]] but allows `T{ object_of_type_T }` to consider user declared > constructors. > > I am working on a separate fix for CWG2311 (Consider constructors as below, > but then if the chosen constructor is not an initializer-list constructor, > elide it). > Fix will be here: https://reviews.llvm.org/D156062 `auto{ prvalue }` will elide a copy for aggregate types again. It will do so after checking constructors for non-aggregate classes now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156032/new/ https://reviews.llvm.org/D156032 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits