From: Manman Ren Date: Thu, 10 Mar 2016 23:51:03 +0000 (+0000) Subject: Add has_feature objc_class_property. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a118d7d4a2e0814ae0711ac47253ec8d6b264855;p=clang Add has_feature objc_class_property. rdar://23891898 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263171 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Lex/PPMacroExpansion.cpp b/lib/Lex/PPMacroExpansion.cpp index 2c9a37525d..62166b22ba 100644 --- a/lib/Lex/PPMacroExpansion.cpp +++ b/lib/Lex/PPMacroExpansion.cpp @@ -1127,6 +1127,7 @@ static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) { .Case("objc_bridge_id_on_typedefs", true) .Case("objc_generics", LangOpts.ObjC2) .Case("objc_generics_variance", LangOpts.ObjC2) + .Case("objc_class_property", LangOpts.ObjC2) // C11 features .Case("c_alignas", LangOpts.C11) .Case("c_alignof", LangOpts.C11) diff --git a/test/SemaObjC/objc-class-property.m b/test/SemaObjC/objc-class-property.m index 7775440090..0058ee3648 100644 --- a/test/SemaObjC/objc-class-property.m +++ b/test/SemaObjC/objc-class-property.m @@ -1,5 +1,9 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s +#if !__has_feature(objc_class_property) +#error does not support class property +#endif + @interface Root -(id) alloc; -(id) init;