================
@@ -1070,10 +1070,8 @@ bool Sema::CheckCXXThrowOperand(SourceLocation ThrowLoc,
 
       // We don't keep the instantiated default argument expressions around so
       // we must rebuild them here.
-      for (unsigned I = 1, E = CD->getNumParams(); I != E; ++I) {
-        if (CheckCXXDefaultArgExpr(ThrowLoc, CD, CD->getParamDecl(I)))
-          return true;
-      }
+      if (BuildCtorClosureDefaultArgs(ThrowLoc, CD, /*IsCopy=*/true))
----------------
efriedma-quic wrote:

I'm confused why we aren't triggering this when we define the copy 
constructor... but I guess it's been that way since 
dfa6d2067c8c782c83be69a61fe59a0240535df6.

Do we need some check to make sure we don't build the arguments more than once?

https://github.com/llvm/llvm-project/pull/203554
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to