rsmith added inline comments.
================ Comment at: lib/Sema/SemaCoroutine.cpp:1285 + // We needed to check it, but we don't need to generate code for it. + if (!paramDecl->getIdentifier()) + continue; ---------------- EricWF wrote: > @rsmith Is there a better way to check if the move would be valid for unnamed > parameters without building up these expressions? We could wire through a flag to tell `AddInitializerToDecl` to build the `InitializationSequence` but not `Perform` it, but I don't think it's worth the effort. In fact, I'd prefer that we store the copy statement in the AST regardless, and make the choice to elide the copy from within `CodeGen`. (Sema shouldn't be dropping parts of the AST just because CodeGen doesn't need them; for example, a tool that wants to identify all potential callers of the move constructor should be able to find this call.) I think we should also disable elision of parameter copies under `-fno-elide-constructors`. https://reviews.llvm.org/D33797 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits