]> granicus.if.org Git - clang/commitdiff
Support __has_attribute for objc_suppress_autosynthesis
authorFariborz Jahanian <fjahanian@apple.com>
Wed, 4 Jan 2012 22:29:28 +0000 (22:29 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Wed, 4 Jan 2012 22:29:28 +0000 (22:29 +0000)
which is automatic with proper spelling :).

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

include/clang/Basic/Attr.td
test/SemaObjC/default-synthesize-3.m

index bf9a6ce147f907cda041cedbdad499619901f7bd..0302c5e3fd88d47091faf5befd3bdeedb788ed07 100644 (file)
@@ -525,7 +525,7 @@ def ArcWeakrefUnavailable : InheritableAttr {
 }
 
 def ObjCSuppressAutosynthesis : InheritableAttr {
-  let Spellings = ["objc_suppress_autosynhesis"];
+  let Spellings = ["objc_suppress_autosynthesis"];
 }
 
 def Unused : InheritableAttr {
index 20e7dd28f293f82899832f79b9c20a8bec5ce365..8616404028d660440f3e6bc4b0c87d6d77ec8c8a 100644 (file)
@@ -1,7 +1,9 @@
 // RUN: %clang_cc1 -x objective-c -fsyntax-only -fobjc-default-synthesize-properties -verify %s
 // RUN: %clang_cc1 -x objective-c++ -fsyntax-only -fobjc-default-synthesize-properties -verify %s
 
+#if __has_attribute(objc_suppress_autosynthesis)
 __attribute ((objc_suppress_autosynthesis)) 
+#endif
 @interface NoAuto
 @property int NoAutoProp; // expected-note 2 {{property declared here}}
 @end