I recently tried to commit a patch that adds support for 'noescape' in clang (see https://reviews.llvm.org/D32210) but reverted it because clang failed to build compiler-rt.
The build fails because the block parameters of the following functions defined in the SDKs are preceded with DISPATCH_NOESCAPE, but the declarations in tsan_libdispatch_mac.cc do not have the attribute:
- dispatch_sync
- dispatch_barrier_sync
- dispatch_once
- dispatch_apply
This patch annotates the declarations in tsan_libdispatch_mac.cc with 'noescape'.
Please re-align the backslash at the end of the line.