================
@@ -3737,8 +3737,24 @@ LValue CodeGenFunction::EmitDeclRefLValue(const
DeclRefExpr *E) {
// an enclosing scope.
if (const auto *BD = dyn_cast<BindingDecl>(ND)) {
if (E->refersToEnclosingVariableOrCapture()) {
- auto *FD = LambdaCaptureFields.lookup(BD);
- return EmitCapturedFieldLValue(*this, FD, CXXABIThisValue);
+ if (auto *DD = dyn_cast<VarDecl>(BD->getDecomposedDecl())) {
+ auto I = LocalDeclMap.find(DD);
+ if (I != LocalDeclMap.end()) {
----------------
alexey-bataev wrote:
WE should always pass through the capture field here, why need a check?
https://github.com/llvm/llvm-project/pull/190832
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits