]> granicus.if.org Git - clang/commitdiff
[analyzer]Fixup r156215: use StopTracking summary instead of ScratchArgs
authorAnna Zaks <ganna@apple.com>
Mon, 7 May 2012 17:47:09 +0000 (17:47 +0000)
committerAnna Zaks <ganna@apple.com>
Mon, 7 May 2012 17:47:09 +0000 (17:47 +0000)
As per Jordy's and Ted's comment, use the default StopTracking summary
instead of adding all arguments to ScratchArs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156310 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp

index 2cf935377123d46106e5fb6272da3868ee05ac5c..325a7657e616f9707a4a5008809a502bb652163b 100644 (file)
@@ -1005,10 +1005,8 @@ RetainSummaryManager::getSummary(const FunctionDecl *FD,
       ScratchArgs = AF.add(ScratchArgs, 2, StopTracking);
       S = getPersistentSummary(RetEffect::MakeNoRet(), DoNothing, DoNothing);
     } else if (CME && CME->hasNonZeroCallbackArg()) {
-      // Allow objects to escape throug callbacks. radar://10973977
-      for (unsigned I = 0; I < CME->getNumArgs(); ++I)
-        ScratchArgs = AF.add(ScratchArgs, I, StopTracking);
-      S = getPersistentSummary(RetEffect::MakeNoRet(), DoNothing, DoNothing);
+      // Allow objects to escape through callbacks. radar://10973977
+      S = getPersistentStopSummary();
     }
 
     // Did we get a summary?