Page MenuHomePhabricator

[CodeGen] Fix a regression by emitting lambda expressions in EmitLValue
ClosedPublic

Authored by erik.pilkington on Apr 1 2019, 2:39 PM.

Details

Summary

Currently, we emit a "unsupported l-value" error for the lambda expression in the following:

@interface X 
@property void (*fnptr)();
@end
void f(X *x) {
  x.fnptr = [] {};
}

This is a regression introduced in rC351487, which prevents clang from emitting lambdas in EmitLValue. This is needed though to support cases where a lambda appears as an OpaqueValueExpr of a PseudoObjectExpr.

rdar://49030379

Diff Detail

Repository
rC Clang

Event Timeline

erik.pilkington created this revision.Apr 1 2019, 2:39 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 1 2019, 2:39 PM
rjmccall accepted this revision.Apr 2 2019, 8:06 AM

LGTM

This revision is now accepted and ready to land.Apr 2 2019, 8:06 AM
This revision was automatically updated to reflect the committed changes.