Skip to content

Commit 32a0705

Browse files
committed
[Macros] Use the singular 'memberAttribute' spelling for attached member
attribute macros.
1 parent f6f57a8 commit 32a0705

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

lib/AST/Decl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9722,7 +9722,7 @@ StringRef swift::getMacroRoleString(MacroRole role) {
97229722
return "accessor";
97239723

97249724
case MacroRole::MemberAttribute:
9725-
return "memberAttributes";
9725+
return "memberAttribute";
97269726

97279727
case MacroRole::Member:
97289728
return "member";

lib/Parse/ParseDecl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2192,7 +2192,7 @@ static Optional<MacroRole> getMacroRole(
21922192
.Case("declaration", MacroRole::Declaration)
21932193
.Case("expression", MacroRole::Expression)
21942194
.Case("accessor", MacroRole::Accessor)
2195-
.Case("memberAttributes", MacroRole::MemberAttribute)
2195+
.Case("memberAttribute", MacroRole::MemberAttribute)
21962196
.Case("member", MacroRole::Member)
21972197
.Default(None);
21982198

test/Macros/composed_macro.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// FIXME: Swift parser is not enabled on Linux CI yet.
1010
// REQUIRES: OS=macosx
1111

12-
@attached(memberAttributes)
12+
@attached(memberAttribute)
1313
@attached(member)
1414
macro myTypeWrapper() = #externalMacro(module: "MacroDefinition", type: "TypeWrapperMacro")
1515
@attached(accessor) macro accessViaStorage() = #externalMacro(module: "MacroDefinition", type: "AccessViaStorageMacro")

test/Macros/macro_expand_attributes.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// FIXME: Swift parser is not enabled on Linux CI yet.
1010
// REQUIRES: OS=macosx
1111

12-
@attached(memberAttributes) macro wrapAllProperties() = #externalMacro(module: "MacroDefinition", type: "WrapAllProperties")
12+
@attached(memberAttribute) macro wrapAllProperties() = #externalMacro(module: "MacroDefinition", type: "WrapAllProperties")
1313

1414
@propertyWrapper
1515
struct Wrapper<T> {

test/Serialization/Inputs/def_macros.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
@attached(accessor) public macro myWrapper() = #externalMacro(module: "MacroDefinition", type: "MyWrapperMacro")
66

7-
@attached(memberAttributes) public macro wrapAllProperties() = #externalMacro(module: "MacroDefinition", type: "WrapAllProperties")
7+
@attached(memberAttribute) public macro wrapAllProperties() = #externalMacro(module: "MacroDefinition", type: "WrapAllProperties")
88

99
// Make sure that macro custom attributes are not serialized.
1010
@wrapAllProperties

0 commit comments

Comments
 (0)