[PATCH] D50866: [analyzer] CFRetainReleaseChecker: Avoid checking C++ methods with the same name.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 16 14:36:45 PDT 2018


NoQ created this revision.
NoQ added reviewers: dcoughlin, george.karpenkov.
Herald added subscribers: cfe-commits, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun.

CFRetainReleaseChecker is a tiny checker that verifies that arguments of CoreFoundation retain/release functions are non-null. The checker accidentally checks all functions with the respective name, not just the actual `CFRetain` etc, which has caused a crash.

Fix it and modernize the checker to use CallEvent/CallDescription APIs to avoid further mistakes.

rdar://problem/42433152


Repository:
  rC Clang

https://reviews.llvm.org/D50866

Files:
  lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
  test/Analysis/retain-release.mm

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50866.161112.patch
Type: text/x-patch
Size: 5647 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180816/836aee9d/attachment-0001.bin>


More information about the cfe-commits mailing list