]> granicus.if.org Git - clang/commit
[analyzer] Process state in checkEndFunction in RetainCountChecker
authorGeorge Karpenkov <ekarpenkov@apple.com>
Fri, 21 Sep 2018 20:37:20 +0000 (20:37 +0000)
committerGeorge Karpenkov <ekarpenkov@apple.com>
Fri, 21 Sep 2018 20:37:20 +0000 (20:37 +0000)
commit09ffc529b92424e9cbc14a8e144182c6240977bc
tree59de7b40f0ae608432fa23afd0064bec63e4a24c
parent9d7fcc690dcdbf1ea1c92c9e7bdeb7abb1a737e0
[analyzer] Process state in checkEndFunction in RetainCountChecker

Modify the RetainCountChecker to perform state "adjustments" in
checkEndFunction, as performing work in PreStmt<ReturnStmt> does not
work with destructors.
The previous version made an implicit assumption that no code runs
after the return statement is executed.

rdar://43945028

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@342770 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp
lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.h
test/Analysis/Inputs/expected-plists/retain-release-path-notes.m.plist
test/Analysis/retain-release-arc.m
test/Analysis/retain-release-path-notes.m