Support __has_attribute for objc_suppress_autosynthesis
which is automatic with proper spelling :).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147555 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/Basic/Attr.td b/include/clang/Basic/Attr.td
index bf9a6ce..0302c5e 100644
--- a/include/clang/Basic/Attr.td
+++ b/include/clang/Basic/Attr.td
@@ -525,7 +525,7 @@
 }
 
 def ObjCSuppressAutosynthesis : InheritableAttr {
-  let Spellings = ["objc_suppress_autosynhesis"];
+  let Spellings = ["objc_suppress_autosynthesis"];
 }
 
 def Unused : InheritableAttr {
diff --git a/test/SemaObjC/default-synthesize-3.m b/test/SemaObjC/default-synthesize-3.m
index 20e7dd2..8616404 100644
--- a/test/SemaObjC/default-synthesize-3.m
+++ b/test/SemaObjC/default-synthesize-3.m
@@ -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