rjmccall added a comment.
The correct fix is to honor isInit by folding the logic for EmitScalarInit into
this function. That should allow you to eliminate EmitScalarInit completely,
although it would be fine to leave it as just a call to EmitStoreThroughLValue.
I did a quick audit of all the calls to EmitStoreThroughLValue that might pass
isInit=true, and it does look like none of them are relying on the current
behavior for ARC ownership; the most suspicious are the calls from
EmitObjCCollectionLiteral, but the l-value there is non lifetime-qualified, so
cfe-commits mailing list