This is an archive of the discontinued LLVM Phabricator instance.

[Sema][ObjC] Preserve syntactic sugar when removing ARCReclaimReturnedObject cast
ClosedPublic

Authored by ahatanak on Oct 6 2017, 7:05 PM.

Details

Summary

This is a follow-up patch to r314370.

Rather than throwing away the enclosing parentheses in maybeUndoReclaimObject, this patch walks down the expression until an ARCReclaimReturnedObject cast is found and removes just the cast, preserving the syntactic sugar expressions (parens and casts) that were visited up to that point.

rdar://problem/34705720

Diff Detail

Repository
rL LLVM

Event Timeline

ahatanak created this revision.Oct 6 2017, 7:05 PM
rjmccall accepted this revision.Oct 6 2017, 8:30 PM

LGTM.

This revision is now accepted and ready to land.Oct 6 2017, 8:30 PM
This revision was automatically updated to reflect the committed changes.