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 :).

llvm-svn: 147555

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

index bf9a6ce..0302c5e 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 20e7dd2..8616404 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