]> granicus.if.org Git - clang/commitdiff
[analyzer] Remove unnecessary code.
authorAnna Zaks <ganna@apple.com>
Fri, 24 Aug 2012 01:39:13 +0000 (01:39 +0000)
committerAnna Zaks <ganna@apple.com>
Fri, 24 Aug 2012 01:39:13 +0000 (01:39 +0000)
This code has been added a while ago and removing it does not trigger
any test failures. The false positives it was trying to suppress are
probably handled by other logic (ex: special handling of delegates).

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

lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp

index ab8acb18318628b34a6fc438bc53ee42de1ba605..dc5731b1f0e6ea5c6c25b5693e494a8929a1a048 100644 (file)
@@ -1358,22 +1358,6 @@ RetainSummaryManager::updateSummaryFromAnnotations(const RetainSummary *&Summ,
 const RetainSummary *
 RetainSummaryManager::getStandardMethodSummary(const ObjCMethodDecl *MD,
                                                Selector S, QualType RetTy) {
-
-  if (MD) {
-    // Scan the method decl for 'void*' arguments.  These should be treated
-    // as 'StopTracking' because they are often used with delegates.
-    // Delegates are a frequent form of false positives with the retain
-    // count checker.
-    unsigned i = 0;
-    for (ObjCMethodDecl::param_const_iterator I = MD->param_begin(),
-         E = MD->param_end(); I != E; ++I, ++i)
-      if (const ParmVarDecl *PD = *I) {
-        QualType Ty = Ctx.getCanonicalType(PD->getType());
-        if (Ty.getLocalUnqualifiedType() == Ctx.VoidPtrTy)
-          ScratchArgs = AF.add(ScratchArgs, i, StopTracking);
-      }
-  }
-
   // Any special effects?
   ArgEffect ReceiverEff = DoNothing;
   RetEffect ResultEff = RetEffect::MakeNoRet();