[PATCH] D82904: [clang-tidy] Warn pointer captured in async block
Ellis Hoag via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 30 12:29:28 PDT 2020
ellis created this revision.
Herald added subscribers: cfe-commits, xazax.hun, mgorny.
Herald added a project: clang.
ellis added a reviewer: clang-tools-extra.
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
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D82904
Files:
clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp
clang-tools-extra/clang-tidy/bugprone/CMakeLists.txt
clang-tools-extra/clang-tidy/bugprone/NoEscapeCheck.cpp
clang-tools-extra/clang-tidy/bugprone/NoEscapeCheck.h
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/docs/clang-tidy/checks/bugprone-no-escape.rst
clang-tools-extra/docs/clang-tidy/checks/list.rst
clang-tools-extra/test/clang-tidy/checkers/bugprone-no-escape.m
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82904.274579.patch
Type: text/x-patch
Size: 8922 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200630/18efdd3d/attachment.bin>
More information about the cfe-commits
mailing list