[all-commits] [llvm/llvm-project] dfa0db: Warn pointer captured in async block

Ellis Hoag via All-commits all-commits at lists.llvm.org
Tue Jul 7 10:31:37 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: dfa0db79d0e37d5cf24a63d1e2b7ba5f40617574
      https://github.com/llvm/llvm-project/commit/dfa0db79d0e37d5cf24a63d1e2b7ba5f40617574
  Author: Ellis Hoag <ellis.sparky.hoag at gmail.com>
  Date:   2020-07-07 (Tue, 07 Jul 2020)

  Changed paths:
    M clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp
    M clang-tools-extra/clang-tidy/bugprone/CMakeLists.txt
    A clang-tools-extra/clang-tidy/bugprone/NoEscapeCheck.cpp
    A clang-tools-extra/clang-tidy/bugprone/NoEscapeCheck.h
    M clang-tools-extra/docs/ReleaseNotes.rst
    A clang-tools-extra/docs/clang-tidy/checks/bugprone-no-escape.rst
    M clang-tools-extra/docs/clang-tidy/checks/list.rst
    A clang-tools-extra/test/clang-tidy/checkers/bugprone-no-escape.m

  Log Message:
  -----------
  Warn pointer captured in async block

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.




More information about the All-commits mailing list