r263171 - Add has_feature objc_class_property.
Manman Ren via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 10 15:51:03 PST 2016
Author: mren
Date: Thu Mar 10 17:51:03 2016
New Revision: 263171
URL: http://llvm.org/viewvc/llvm-project?rev=263171&view=rev
Log:
Add has_feature objc_class_property.
rdar://23891898
Modified:
cfe/trunk/lib/Lex/PPMacroExpansion.cpp
cfe/trunk/test/SemaObjC/objc-class-property.m
Modified: cfe/trunk/lib/Lex/PPMacroExpansion.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPMacroExpansion.cpp?rev=263171&r1=263170&r2=263171&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPMacroExpansion.cpp (original)
+++ cfe/trunk/lib/Lex/PPMacroExpansion.cpp Thu Mar 10 17:51:03 2016
@@ -1127,6 +1127,7 @@ static bool HasFeature(const Preprocesso
.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)
Modified: cfe/trunk/test/SemaObjC/objc-class-property.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/objc-class-property.m?rev=263171&r1=263170&r2=263171&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/objc-class-property.m (original)
+++ cfe/trunk/test/SemaObjC/objc-class-property.m Thu Mar 10 17:51:03 2016
@@ -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;
More information about the cfe-commits
mailing list