================
@@ -6714,7 +6714,8 @@ void InitializationSequence::InitializeFrom(Sema &S,
         OverloadCandidateSet::iterator Best;
         OverloadingResult OR = getFailedCandidateSet().BestViableFunction(
             S, Kind.getLocation(), Best);
-        if (OR != OverloadingResult::OR_Deleted) {
+        if (OR != OverloadingResult::OR_Deleted &&
+            Kind.getKind() == InitializationKind::IK_Direct) {
----------------
cor3ntin wrote:

Oh, I missed that. Thanks for the explanation.

Can you
 - Add that wording sentence as a comment
 - Add tests demonstrating the parent-init case and brace-init cases? 

https://github.com/llvm/llvm-project/pull/131320
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to