summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-03-23 06:26:56 +0000
committerTed Kremenek <kremenek@apple.com>2012-03-23 06:26:56 +0000
commit161046edabfaaec73b320da65b4dc48da07973cd (patch)
treeb3e6ce534252c77cdec0b25446b7d8186f3f4b58 /clang/lib/StaticAnalyzer/Checkers
parentaefeaa9873bb8a0f997498e7b28d0d6d9742f9aa (diff)
downloadbcm5719-llvm-161046edabfaaec73b320da65b4dc48da07973cd.tar.gz
bcm5719-llvm-161046edabfaaec73b320da65b4dc48da07973cd.zip
Avoid applying retain/release effects twice in RetainCountChecker when a function call was inlined (i.e., we do not need to apply summaries in such cases).
llvm-svn: 153309
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
index 940228e6795..bf4b76c6405 100644
--- a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
@@ -2599,6 +2599,9 @@ void RetainCountChecker::checkPostStmt(const CastExpr *CE,
void RetainCountChecker::checkPostStmt(const CallExpr *CE,
CheckerContext &C) const {
+ if (C.wasInlined)
+ return;
+
// Get the callee.
ProgramStateRef state = C.getState();
const Expr *Callee = CE->getCallee();
OpenPOWER on IntegriCloud