The block arguments in dispatch_async() and dispatch_after() are
guaranteed to escape. If those blocks capture any pointers with the
noescape attribute then it is an error.
Test Plan:
ninja check-clang-tools
Differential D82904
[clang-tidy] Warn pointer captured in async block ellis on Jun 30 2020, 12:08 PM. Authored by
Details
The block arguments in dispatch_async() and dispatch_after() are Test Plan:
Diff Detail
Event TimelineComment Actions Please override isLanguageVersionSupported to restrict this check to just running on ObjectiveC translation units.
Comment Actions Use LangOpts.Blocks instead of LangOpts.ObjC and add FIXME about grabbing the use location of a CapturedVar.
Comment Actions LGTM with a testing request.
Comment Actions Hey @aaron.ballman, thanks for accepting my diff! Would you mind landing my diff since I don't have commit access yet? Comment Actions Gladly -- I've committed on your behalf in dfa0db79d0e37d5cf24a63d1e2b7ba5f40617574, thank you for the patch!
|
clang-format not found in user's PATH; not linting file.