diff options
author | Iain Sandoe <iain@sandoe.co.uk> | 2020-11-04 23:52:12 +0000 |
---|---|---|
committer | Iain Sandoe <iain@sandoe.co.uk> | 2020-11-08 09:38:38 +0000 |
commit | b642fca1c31b2e2175e0860daf32b4ee0d918085 (patch) | |
tree | 9fe0006f6338261f7e93d465a09686a2010e0119 /gcc/c-family/c-objc.h | |
parent | 49393e266a2570cb6227777acd4674f922c8a26b (diff) | |
download | gcc-b642fca1c31b2e2175e0860daf32b4ee0d918085.zip gcc-b642fca1c31b2e2175e0860daf32b4ee0d918085.tar.gz gcc-b642fca1c31b2e2175e0860daf32b4ee0d918085.tar.bz2 |
Objective-C/C++ : Handle parsing @property 'class' attribute.
This attribute states that a property is one manipulated by class
methods (it requires a static variable and the setter and getter
must be provided explicitly, they cannot be @synthesized).
gcc/c-family/ChangeLog:
* c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
of keywords accepted in @property attribute contexts.
* c-objc.h (enum objc_property_attribute_group): Add
OBJC_PROPATTR_GROUP_CLASS.
(enum objc_property_attribute_kind): Add
OBJC_PROPERTY_ATTR_CLASS.
gcc/cp/ChangeLog:
* parser.c (cp_parser_objc_at_property_declaration): Handle
class keywords in @property attribute context.
gcc/objc/ChangeLog:
* objc-act.c (objc_prop_attr_kind_for_rid): Handle class
attribute.
(objc_add_property_declaration): Likewise.
* objc-act.h (PROPERTY_CLASS): Record class attribute state.
gcc/testsuite/ChangeLog:
* obj-c++.dg/property/at-property-4.mm: Test handling class
attributes.
* objc.dg/property/at-property-4.m: Likewise.
Diffstat (limited to 'gcc/c-family/c-objc.h')
-rw-r--r-- | gcc/c-family/c-objc.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/c-family/c-objc.h b/gcc/c-family/c-objc.h index a2ca112..6e96731 100644 --- a/gcc/c-family/c-objc.h +++ b/gcc/c-family/c-objc.h @@ -44,6 +44,7 @@ enum objc_property_attribute_group OBJC_PROPATTR_GROUP_READWRITE, OBJC_PROPATTR_GROUP_ASSIGN, OBJC_PROPATTR_GROUP_ATOMIC, + OBJC_PROPATTR_GROUP_CLASS, OBJC_PROPATTR_GROUP_MAX }; @@ -59,6 +60,7 @@ enum objc_property_attribute_kind OBJC_PROPERTY_ATTR_COPY = ( 7 << 8)|OBJC_PROPATTR_GROUP_ASSIGN, OBJC_PROPERTY_ATTR_ATOMIC = ( 8 << 8)|OBJC_PROPATTR_GROUP_ATOMIC, OBJC_PROPERTY_ATTR_NONATOMIC = ( 9 << 8)|OBJC_PROPATTR_GROUP_ATOMIC, + OBJC_PROPERTY_ATTR_CLASS = (16 << 8)|OBJC_PROPATTR_GROUP_CLASS, OBJC_PROPERTY_ATTR_MAX = (255 << 8|OBJC_PROPATTR_GROUP_MAX) }; |