================
@@ -146,6 +146,29 @@ Address CodeGenFunction::LoadCXXThisAddress() {
       false, nullptr, nullptr, KnownNonNull);
 }
 
+QualType CodeGenFunction::getCXXThisType() const {
----------------
akash-manna-sky wrote:

Yes, the body has `CXXThisExprs` but nothing reachable from the capture. Done: 
`BlockDecl` now stores the type of the captured `this` (replacing the bool), 
set from the Sema capture and serialized, and `computeBlockInfo` and the block 
debug info just read it.

While wiring that up I found `CheckCXXThisCapture` applied `ByCopy` to every 
enclosing closure, so `[&]{ [*this]{} }` made the outer lambda (or an enclosing 
block) copy `*this`; the comment above the loop says the opposite I think. 
Fixed in the same loop, as the recorded block type depends on it.


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

Reply via email to