efriedma added inline comments.
================ Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:1472 + // the call operator body. + EmitLambdaStaticInvokeBody(cast<CXXMethodDecl>(FD)); } else if (FD->isDefaulted() && isa<CXXMethodDecl>(FD) && ---------------- akhuang wrote: > efriedma wrote: > > Does this pass the correct value of "this"? EmitLambdaStaticInvokeBody > > creates a new alloca to represent "this", but it's already an argument to > > the function. > > > > Granted, it only matters in really obscure cases, but still. > That's true, the "this" won't be passed correctly. > > Actually, would it be fine to just emit the original call op body? (so that > the same function body is emitted twice -- once in the call op and once in > __impl). Not completely sure what you're asking... but as I've mentioned, we can't EmitFunctionBody() the body of a function more than once. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137872/new/ https://reviews.llvm.org/D137872 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits