This is an archive of the discontinued LLVM Phabricator instance.

Remove the fixit for the diagnostics regarding capturing autoreleasing variables in a block
ClosedPublic

Authored by george.karpenkov on May 11 2018, 3:08 PM.

Details

Summary

The fixit is actively harmful, as it encourages developers to ignore the warning and to write unsafe code.
It is almost impossible to write safe code while capturing autoreleasing variables in the block, as in order to check that the block is never called in the autoreleasing pool the developer has to check the transitive closure of all potential callers of the block.

Diff Detail

Event Timeline

dexonsmith edited reviewers, added: ahatanak; removed: dexonsmith.May 11 2018, 4:41 PM
arphaman accepted this revision.May 11 2018, 5:08 PM

LGTM.

This revision is now accepted and ready to land.May 11 2018, 5:08 PM
ahatanak accepted this revision.May 14 2018, 12:00 PM

Sorry for the delay, LGTM.

This revision was automatically updated to reflect the committed changes.