From 161046edabfaaec73b320da65b4dc48da07973cd Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Fri, 23 Mar 2012 06:26:56 +0000 Subject: 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 --- clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp') 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(); -- cgit v1.2.3