__attribute__((noescape)) doesn't seem to work in Objective-C

Originator:lithium3141
Number:rdar://19989922 Date Originated:27-Feb-2015 02:08 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 6.3 (6D532l) / OS X 10.10.2 (14C109)
Classification:Other Bug Reproducible:Always
 
Summary:
The Xcode 6.3 beta 2 release notes describe a new attribute "noescape," which specifies that a given block argument won't be captured and escape the receiving method. However, this attribute fails to produce a warning in pure Objective-C code when the method does in fact cause the given block to escape.

Steps to Reproduce:
1. Open the attached sample project
2. Build it

Expected Results:
-invokeBlockLater: produces a warning because the given block, despite being declared with __attribute__((noescape)), is captured in both the lastLaterBlock and the laterBlocks properties.

Actual Results:
No warning is produced.

Note:
Sample project at https://github.com/lithium3141/NoescapeTest

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!