From: Fariborz Jahanian Date: Wed, 4 Jan 2012 22:29:28 +0000 (+0000) Subject: Support __has_attribute for objc_suppress_autosynthesis X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fe40bf8276b8989cacd39e15f8b393fd0661915a;p=clang 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 bf9a6ce147..0302c5e3fd 100644 --- a/include/clang/Basic/Attr.td +++ b/include/clang/Basic/Attr.td @@ -525,7 +525,7 @@ def ArcWeakrefUnavailable : InheritableAttr { } 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 20e7dd28f2..8616404028 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