Skip to content

Commit 9ecee2c

Browse files
committed
[Macros] Access control and availability attributes apply to macros
1 parent 9678d12 commit 9ecee2c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

gyb_syntax_support/AttributeKinds.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def __init__(self, name, swift_name=None):
4747
OnValue = 'OnValue'
4848
OnTypeAlias = 'OnTypeAlias'
4949
OnEnumElement = 'OnEnumElement'
50+
OnMacro = 'OnMacro'
5051
OnSubscript = 'OnSubscript'
5152
OnVar = 'OnVar'
5253
OnExtension = 'OnExtension'
@@ -173,7 +174,7 @@ def __init__(self, name, swift_name=None):
173174
APIStableToAdd, APIStableToRemove,
174175
code=0),
175176
DeclAttribute('available', 'Available',
176-
OnAbstractFunction, OnGenericType, OnVar, OnSubscript, OnEnumElement,
177+
OnAbstractFunction, OnGenericType, OnVar, OnSubscript, OnEnumElement, OnMacro,
177178
OnExtension, AllowMultipleAttributes, LongAttribute,
178179
ABIStableToAdd, ABIStableToRemove, APIStableToAdd, APIStableToRemove,
179180
code=1),
@@ -530,7 +531,7 @@ def __init__(self, name, swift_name=None):
530531

531532
DeclAttribute('_spi', 'SPIAccessControl',
532533
OnAbstractFunction, OnExtension, OnGenericType, OnVar, OnSubscript,
533-
OnImport, OnAccessor, OnEnumElement,
534+
OnImport, OnAccessor, OnEnumElement, OnMacro,
534535
AllowMultipleAttributes, UserInaccessible,
535536
ABIStableToAdd, ABIStableToRemove, APIBreakingToAdd, APIStableToRemove,
536537
code=98),
@@ -645,7 +646,7 @@ def __init__(self, name, swift_name=None):
645646
code=125),
646647

647648
DeclAttribute('_unavailableFromAsync', 'UnavailableFromAsync',
648-
OnFunc, OnConstructor, UserInaccessible,
649+
OnFunc, OnConstructor, OnMacro, UserInaccessible,
649650
ABIStableToAdd, ABIStableToRemove,
650651
APIBreakingToAdd, APIStableToRemove,
651652
code=127),
@@ -810,7 +811,7 @@ def __init__(self, name, swift_name=None):
810811
code=44),
811812
DeclAttribute('private', 'AccessControl',
812813
OnFunc, OnAccessor, OnExtension, OnGenericType, OnVar, OnSubscript,
813-
OnConstructor,
814+
OnConstructor, OnMacro,
814815
DeclModifier,
815816
NotSerialized,
816817
ABIStableToAdd, ABIStableToRemove, APIStableToAdd, APIStableToRemove,

0 commit comments

Comments
 (0)