]> granicus.if.org Git - clang/commitdiff
Remove experimental attribute 'ns_ownership_make_collectable.'
authorTed Kremenek <kremenek@apple.com>
Mon, 4 May 2009 23:46:06 +0000 (23:46 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 4 May 2009 23:46:06 +0000 (23:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70940 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Attr.h
include/clang/Parse/AttributeList.h
lib/Analysis/CFRefCount.cpp
lib/Frontend/PCHReaderDecl.cpp
lib/Frontend/PCHWriter.cpp
lib/Parse/AttributeList.cpp
lib/Sema/SemaDeclAttr.cpp
test/Analysis/retain-release-gc-only.m

index 41ea065447a2ebe24d43e384cd405573579572d6..79f41bda5d69659a8807b697b2678babeb7a314e 100644 (file)
@@ -61,7 +61,6 @@ public:
     ObjCNSObject,
     CFOwnershipRelease,       // Clang/Checker-specific.
     CFOwnershipRetain,        // Clang/Checker-specific.
-    NSOwnershipMakeCollectable, // Clang/Checker-specific.
     NSOwnershipRelease,         // Clang/Checker-specific.
     NSOwnershipRetain,          // Clang/Checker-specific.
     NSOwnershipReturns,         // Clang/Checker-specific.
@@ -470,7 +469,6 @@ DEF_SIMPLE_ATTR(CFOwnershipRelease);
 DEF_SIMPLE_ATTR(NSOwnershipRelease);
 DEF_SIMPLE_ATTR(CFOwnershipRetain);
 DEF_SIMPLE_ATTR(NSOwnershipRetain);
-DEF_SIMPLE_ATTR(NSOwnershipMakeCollectable);
 DEF_SIMPLE_ATTR(NSOwnershipReturns);
 
 #undef DEF_SIMPLE_ATTR
index 84a180b5e3abd91417183c50115e873c27d25e3c..24cfcb8d478b20a0f94775007e3bc90f782aa2e0 100644 (file)
@@ -78,7 +78,6 @@ public:
     AT_objc_exception,
     AT_cf_ownership_release,        // Clang-specific.
     AT_cf_ownership_retain,         // Clang-specific.
-    AT_ns_ownership_make_collectable, // Clang-specific.
     AT_ns_ownership_release,          // Clang-specific.
     AT_ns_ownership_retain,           // Clang-specific.
     AT_ns_ownership_returns,          // Clang-specific.
index 54843d534a42de92084ead402bb98f193e9b4880..976bfad188de9f09b5d2c1a03b3df5eafd0f7cc7 100644 (file)
@@ -1113,8 +1113,6 @@ RetainSummaryManager::updateSummaryArgEffFromAnnotations(RetainSummary &Summ,
     Summ.setArgEffect(AF, i, DecRefMsg);
   else if (PD->getAttr<CFOwnershipReleaseAttr>())
     Summ.setArgEffect(AF, i, DecRef);
-  else if (PD->getAttr<NSOwnershipMakeCollectableAttr>())
-    Summ.setArgEffect(AF, i, MakeCollectable);  
 }
 
 void
index bed010d7da7c74721e1fe5ded08b244cb90e4fae..ff2eb9f7c92961298ec776ea7b5a37802bb1766f 100644 (file)
@@ -477,7 +477,6 @@ Attr *PCHReader::ReadAttributes() {
     SIMPLE_ATTR(ObjCNSObject);
     SIMPLE_ATTR(CFOwnershipRelease);
     SIMPLE_ATTR(CFOwnershipRetain);
-    SIMPLE_ATTR(NSOwnershipMakeCollectable);
     SIMPLE_ATTR(NSOwnershipRelease);
     SIMPLE_ATTR(NSOwnershipRetain);
     SIMPLE_ATTR(NSOwnershipReturns);
index 2d4d8e44477ee12736bc5dfbd44708e52e2dd9a6..a1f0cb7f4fe53039989787ea9ad5d2896f17fd7d 100644 (file)
@@ -1551,7 +1551,6 @@ void PCHWriter::WriteAttributeRecord(const Attr *Attr) {
     case Attr::ObjCNSObject:
     case Attr::CFOwnershipRelease:
     case Attr::CFOwnershipRetain:
-    case Attr::NSOwnershipMakeCollectable:
     case Attr::NSOwnershipRelease:
     case Attr::NSOwnershipRetain:
     case Attr::NSOwnershipReturns:
index c68a5b735bd87e4dbbc619bc70c7ac1436258c23..704d98a07e8bca9c4f8363ea61fd6b88d2665394 100644 (file)
@@ -151,10 +151,6 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo *Name) {
     if (!memcmp(Str, "no_instrument_function", 22))
       return AT_no_instrument_function;
     break;
-  case 29:
-    if (!memcmp(Str, "ns_ownership_make_collectable", 29))
-      return AT_ns_ownership_make_collectable;
-    break;
   }  
   return UnknownAttribute;
 }
index b29bcec1aa7bd5a09fb118a6953e4f7876db07b9..2cd9713a42fbffb11c4f47f13878e76a5fe239f0 100644 (file)
@@ -1573,8 +1573,6 @@ static void HandleNSOwnershipAttr(Decl *d, const AttributeList &Attr,
         name = "cf_ownership_release"; break;
       case AttributeList::AT_cf_ownership_retain:
         name = "cf_ownership_retain"; break;
-      case AttributeList::AT_ns_ownership_make_collectable:
-        name = "ns_ownership_make_collectable"; break;
       case AttributeList::AT_ns_ownership_release:
         name = "ns_ownership_release"; break;
       case AttributeList::AT_ns_ownership_retain:
@@ -1595,8 +1593,6 @@ static void HandleNSOwnershipAttr(Decl *d, const AttributeList &Attr,
       d->addAttr(::new (S.Context) CFOwnershipReleaseAttr()); return;      
     case AttributeList::AT_cf_ownership_retain:
       d->addAttr(::new (S.Context) CFOwnershipRetainAttr()); return;
-    case AttributeList::AT_ns_ownership_make_collectable:
-      d->addAttr(::new (S.Context) NSOwnershipMakeCollectableAttr()); return;
     case AttributeList::AT_ns_ownership_release:
       d->addAttr(::new (S.Context) NSOwnershipReleaseAttr());   return;
     case AttributeList::AT_ns_ownership_retain:
@@ -1645,7 +1641,6 @@ static void ProcessDeclAttribute(Decl *D, const AttributeList &Attr, Sema &S) {
   case AttributeList::AT_cf_ownership_release:     
   case AttributeList::AT_cf_ownership_retain:
       HandleNSOwnershipAttr(D, Attr, S); break;
-  case AttributeList::AT_ns_ownership_make_collectable:
   case AttributeList::AT_ns_ownership_release:
   case AttributeList::AT_ns_ownership_retain:
       HandleNSOwnershipAttr(D, Attr, S, true); break;
index 79f9f4c1e596852f1014618f8b1c04aeb7cef560..b4095837a927da0f392cf26e9929304cdf69467c 100644 (file)
@@ -134,7 +134,6 @@ void f3() {
 - (void) myCFRetain:(id)__attribute__((cf_ownership_retain))obj;
 - (void) myRelease:(id)__attribute__((ns_ownership_release))obj;
 - (void) myCFRelease:(id)__attribute__((cf_ownership_release))obj;
-- (void) makeCollectable:(id)__attribute__((ns_ownership_make_collectable))obj;
 @end
 
 void test_attr_1(TestOwnershipAttr *X) {
@@ -189,7 +188,7 @@ void test_attr_6a(TestOwnershipAttr *X) {
 
 void test_attr_6b(TestOwnershipAttr *X) {
   CFMutableArrayRef A = CFArrayCreateMutable(0, 10, &kCFTypeArrayCallBacks); // no-warning
-  [X makeCollectable:(id)A];
+  CFMakeCollectable(A);
 }