Page MenuHomePhabricator

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

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



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

@interface X 
@property void (*fnptr)();
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.


Diff Detail

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


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.