]> granicus.if.org Git - clang/commitdiff
Remove 'atomic' as a property attribute keyword.
authorFariborz Jahanian <fjahanian@apple.com>
Wed, 8 Jun 2011 16:40:09 +0000 (16:40 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Wed, 8 Jun 2011 16:40:09 +0000 (16:40 +0000)
It is not a sanctioned keyword and is assumed as default.
// rdar://8790791

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

include/clang/AST/DeclObjC.h
include/clang/Sema/DeclSpec.h
lib/Parse/ParseObjc.cpp
lib/Sema/SemaObjCProperty.cpp
test/SemaObjC/warn-implicit-atomic-property.m

index 0a4d864cd867d3636625cd701964058809cde90e..6b2113a695cea06005eb579fe1054f3748f73a5c 100644 (file)
@@ -1380,8 +1380,7 @@ public:
     OBJC_PR_retain    = 0x10,
     OBJC_PR_copy      = 0x20,
     OBJC_PR_nonatomic = 0x40,
-    OBJC_PR_setter    = 0x80,
-    OBJC_PR_atomic    = 0x100
+    OBJC_PR_setter    = 0x80
   };
 
   enum SetterKind { Assign, Retain, Copy };
index be1f5f8c798abe5ec12c4c66c02dfdc3764f2905..456612bc220d64f348f59352371f0791a7cacf34 100644 (file)
@@ -688,8 +688,7 @@ public:
     DQ_PR_retain = 0x10,
     DQ_PR_copy = 0x20,
     DQ_PR_nonatomic = 0x40,
-    DQ_PR_setter = 0x80,
-    DQ_PR_atomic = 0x100
+    DQ_PR_setter = 0x80
   };
 
 
index fdbedc54d1cd2a16703250f643991b7168dc85ec..8c8fd746a63b27e2effc9873cf6539020b6e235d 100644 (file)
@@ -512,8 +512,6 @@ void Parser::ParseObjCPropertyAttribute(ObjCDeclSpec &DS, Decl *ClassDecl) {
       DS.setPropertyAttributes(ObjCDeclSpec::DQ_PR_copy);
     else if (II->isStr("nonatomic"))
       DS.setPropertyAttributes(ObjCDeclSpec::DQ_PR_nonatomic);
-    else if (II->isStr("atomic"))
-      DS.setPropertyAttributes(ObjCDeclSpec::DQ_PR_atomic);
     else if (II->isStr("getter") || II->isStr("setter")) {
       bool IsSetter = II->getNameStart()[0] == 's';
 
index 6c4469cef9ef7bd5cdf44a0978aa17400115f619..109826942ee191523629df3d4c825417a324dcd8 100644 (file)
@@ -295,8 +295,6 @@ ObjCPropertyDecl *Sema::CreatePropertyDecl(Scope *S,
 
   if (Attributes & ObjCDeclSpec::DQ_PR_nonatomic)
     PDecl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_nonatomic);
-  else if (Attributes & ObjCDeclSpec::DQ_PR_atomic)
-    PDecl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_atomic);
 
   PDecl->setPropertyAttributesAsWritten(PDecl->getPropertyAttributes());
   
@@ -348,8 +346,7 @@ Decl *Sema::ActOnPropertyImplDecl(Scope *S,
       return 0;
     }
     unsigned PIkind = property->getPropertyAttributesAsWritten();
-    if ((PIkind & (ObjCPropertyDecl::OBJC_PR_atomic |
-                   ObjCPropertyDecl::OBJC_PR_nonatomic) ) == 0) {
+    if ((PIkind & ObjCPropertyDecl::OBJC_PR_nonatomic) == 0) {
       if (AtLoc.isValid())
         Diag(AtLoc, diag::warn_implicit_atomic_property);
       else
@@ -1091,8 +1088,7 @@ Sema::AtomicPropertySetterGetterRules (ObjCImplDecl* IMPDecl,
     unsigned Attributes = Property->getPropertyAttributes();
     unsigned AttributesAsWrittern = Property->getPropertyAttributesAsWritten();
 
-    if (!(AttributesAsWrittern & ObjCPropertyDecl::OBJC_PR_atomic) &&
-        !(AttributesAsWrittern & ObjCPropertyDecl::OBJC_PR_nonatomic)) {
+    if (!(AttributesAsWrittern & ObjCPropertyDecl::OBJC_PR_nonatomic)) {
       GetterMethod = IMPDecl->getInstanceMethod(Property->getGetterName());
       SetterMethod = IMPDecl->getInstanceMethod(Property->getSetterName());
       LookedUpGetterSetter = true;
index 0b4590a42db7bbb98c8c717ad6d39170a43c3ef6..bf60dbb63076c8355e3cbedc8c7999f2d0c4bcdf 100644 (file)
@@ -3,11 +3,11 @@
 
 @interface Super
 @property (nonatomic, readwrite) int P; // OK
-@property (atomic, readwrite) int P1; // OK
+@property (readwrite) int P1; // expected-note {{property declared here}}
 @property (readwrite) int P2; // expected-note {{property declared here}}
 @property int P3; // expected-note {{property declared here}}
 @end
 
 @implementation Super // expected-warning {{property is assumed atomic when auto-synthesizing the property [-Wimplicit-atomic-properties]}}
-@synthesize P,P1,P2; // expected-warning {{property is assumed atomic by default [-Wimplicit-atomic-properties]}}
+@synthesize P,P1,P2; // expected-warning {{property is assumed atomic by default [-Wimplicit-atomic-properties]}}
 @end