From: Ted Kremenek Date: Mon, 4 May 2009 23:46:06 +0000 (+0000) Subject: Remove experimental attribute 'ns_ownership_make_collectable.' X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d99b345a1ae77c746ef025e6a050908d69e2c543;p=clang Remove experimental attribute 'ns_ownership_make_collectable.' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70940 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/Attr.h b/include/clang/AST/Attr.h index 41ea065447..79f41bda5d 100644 --- a/include/clang/AST/Attr.h +++ b/include/clang/AST/Attr.h @@ -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 diff --git a/include/clang/Parse/AttributeList.h b/include/clang/Parse/AttributeList.h index 84a180b5e3..24cfcb8d47 100644 --- a/include/clang/Parse/AttributeList.h +++ b/include/clang/Parse/AttributeList.h @@ -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. diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp index 54843d534a..976bfad188 100644 --- a/lib/Analysis/CFRefCount.cpp +++ b/lib/Analysis/CFRefCount.cpp @@ -1113,8 +1113,6 @@ RetainSummaryManager::updateSummaryArgEffFromAnnotations(RetainSummary &Summ, Summ.setArgEffect(AF, i, DecRefMsg); else if (PD->getAttr()) Summ.setArgEffect(AF, i, DecRef); - else if (PD->getAttr()) - Summ.setArgEffect(AF, i, MakeCollectable); } void diff --git a/lib/Frontend/PCHReaderDecl.cpp b/lib/Frontend/PCHReaderDecl.cpp index bed010d7da..ff2eb9f7c9 100644 --- a/lib/Frontend/PCHReaderDecl.cpp +++ b/lib/Frontend/PCHReaderDecl.cpp @@ -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); diff --git a/lib/Frontend/PCHWriter.cpp b/lib/Frontend/PCHWriter.cpp index 2d4d8e4447..a1f0cb7f4f 100644 --- a/lib/Frontend/PCHWriter.cpp +++ b/lib/Frontend/PCHWriter.cpp @@ -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: diff --git a/lib/Parse/AttributeList.cpp b/lib/Parse/AttributeList.cpp index c68a5b735b..704d98a07e 100644 --- a/lib/Parse/AttributeList.cpp +++ b/lib/Parse/AttributeList.cpp @@ -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; } diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index b29bcec1aa..2cd9713a42 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -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; diff --git a/test/Analysis/retain-release-gc-only.m b/test/Analysis/retain-release-gc-only.m index 79f9f4c1e5..b4095837a9 100644 --- a/test/Analysis/retain-release-gc-only.m +++ b/test/Analysis/retain-release-gc-only.m @@ -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); }