Add has_feature objc_class_property.

rdar://23891898

llvm-svn: 263171
This commit is contained in:
Manman Ren 2016-03-10 23:51:03 +00:00
parent 02281b8419
commit 515758e076
2 changed files with 5 additions and 0 deletions

View File

@ -1127,6 +1127,7 @@ static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) {
.Case("objc_bridge_id_on_typedefs", true) .Case("objc_bridge_id_on_typedefs", true)
.Case("objc_generics", LangOpts.ObjC2) .Case("objc_generics", LangOpts.ObjC2)
.Case("objc_generics_variance", LangOpts.ObjC2) .Case("objc_generics_variance", LangOpts.ObjC2)
.Case("objc_class_property", LangOpts.ObjC2)
// C11 features // C11 features
.Case("c_alignas", LangOpts.C11) .Case("c_alignas", LangOpts.C11)
.Case("c_alignof", LangOpts.C11) .Case("c_alignof", LangOpts.C11)

View File

@ -1,5 +1,9 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s // RUN: %clang_cc1 -fsyntax-only -verify %s
#if !__has_feature(objc_class_property)
#error does not support class property
#endif
@interface Root @interface Root
-(id) alloc; -(id) alloc;
-(id) init; -(id) init;