[all-commits] [llvm/llvm-project] e94192: [analyzer] Add support for ObjCIndirectCopyRestore...

NoQ via All-commits all-commits at lists.llvm.org
Wed Jun 3 09:06:30 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e94192198f8a949c7880620b06e9ef85d87ad4b3
      https://github.com/llvm/llvm-project/commit/e94192198f8a949c7880620b06e9ef85d87ad4b3
  Author: Paul Pelzl <ppelzl at apple.com>
  Date:   2020-06-03 (Wed, 03 Jun 2020)

  Changed paths:
    M clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
    A clang/test/Analysis/objc-indirect-copy-restore.m

  Log Message:
  -----------
  [analyzer] Add support for ObjCIndirectCopyRestoreExpr.

Idiomatic objc using ARC will generate this expression regularly due to
NSError out-param passing.  Providing an implementation for this
expression allows the analyzer to explore many more codepaths in ARC
projects.

The current implementation is not perfect but the differences are hopefully
subtle enough to not cause much problems.

rdar://63918914

Differential Revision: https://reviews.llvm.org/D81071


  Commit: 7113271528a4c6efc8b57f25ead28f65b5e48757
      https://github.com/llvm/llvm-project/commit/7113271528a4c6efc8b57f25ead28f65b5e48757
  Author: Paul Pelzl <ppelzl at apple.com>
  Date:   2020-06-03 (Wed, 03 Jun 2020)

  Changed paths:
    M clang/lib/StaticAnalyzer/Checkers/ObjCAutoreleaseWriteChecker.cpp
    M clang/test/Analysis/autoreleasewritechecker_test.m

  Log Message:
  -----------
  [analyzer] ObjCAutoreleaseWriteChecker: Support explicit autoreleasepools.

The checker currently supports only a whitelist of block-enumeration
methods which are known to internally clear an autorelease pool.
Extend this checker to detect writes within the scope of explicit
@autoreleasepool statements.

rdar://25301111

Differential Revision: https://reviews.llvm.org/D81072


Compare: https://github.com/llvm/llvm-project/compare/3abe7aca455b...7113271528a4


More information about the All-commits mailing list