diff options
author | Anna Zaks <ganna@apple.com> | 2012-11-03 02:54:16 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2012-11-03 02:54:16 +0000 |
commit | fadcd5d5bbe1bfc1c6b8d819cc2242f780a49fec (patch) | |
tree | b4904c9e7467fc6aaa367eed2338750ad2ac18d7 /lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp | |
parent | b355be838a22a511d078504b2277f70aea52ca85 (diff) |
[analyzer] add LocationContext::inTopFrame() helper.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167351 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp b/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp index cc5cf63531..304051c139 100644 --- a/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp @@ -3190,12 +3190,6 @@ bool RetainCountChecker::evalCall(const CallExpr *CE, CheckerContext &C) const { // Handle return statements. //===----------------------------------------------------------------------===// -// Return true if the current LocationContext has no caller context. -static bool inTopFrame(CheckerContext &C) { - const LocationContext *LC = C.getLocationContext(); - return LC->getParent() == 0; -} - void RetainCountChecker::checkPreStmt(const ReturnStmt *S, CheckerContext &C) const { @@ -3204,7 +3198,7 @@ void RetainCountChecker::checkPreStmt(const ReturnStmt *S, // better checking even for inlined calls, and see if they match // with their expected semantics (e.g., the method should return a retained // object, etc.). - if (!inTopFrame(C)) + if (!C.inTopFrame()) return; const Expr *RetE = S->getRetValue(); |