Add new checker-specific attribute 'objc_ownership_cfretain'. This is the same
as 'objc_ownership_cfretain' except that the method acts like a CFRetain instead
of a [... retain] (important in GC modes). Checker support is wired up, but
currently only for Objective-C message expressions (not function calls).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70218 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp
index c2369ab..6223e7c 100644
--- a/lib/Analysis/CFRefCount.cpp
+++ b/lib/Analysis/CFRefCount.cpp
@@ -1104,7 +1104,11 @@
       ScratchArgs.push_back(std::make_pair(i, IncRefMsg));
       hasArgEffect = true;
     }
-}
+    else if ((*I)->getAttr<ObjCOwnershipCFRetainAttr>()) {
+      ScratchArgs.push_back(std::make_pair(i, IncRef));
+      hasArgEffect = true;
+    }    
+  }
   
   if (!hasRetEffect && !hasArgEffect)
     return 0;