Skip to content

Commit 600b860

Browse files
committed
AST: Quote attributes more consistently in DiagnosticsModuleDiffer.def
1 parent c82fa57 commit 600b860

11 files changed

+69
-69
lines changed

include/swift/AST/DiagnosticsModuleDiffer.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ ERROR(optional_req_changed,APIDigesterBreakage,"%0 is %select{now|no longer}1 an
6666

6767
ERROR(no_longer_open,APIDigesterBreakage,"%0 is no longer open for subclassing", (StringRef))
6868

69-
ERROR(func_type_escaping_changed,APIDigesterBreakage,"%0 has %select{removed|added}2 @escaping in %1", (StringRef, StringRef, bool))
69+
ERROR(func_type_escaping_changed,APIDigesterBreakage,"%0 has %select{removed|added}2 '@escaping' in %1", (StringRef, StringRef, bool))
7070

7171
ERROR(func_self_access_change,APIDigesterBreakage,"%0 has self access kind changing from %1 to %2", (StringRef, StringRef, StringRef))
7272

@@ -78,7 +78,7 @@ ERROR(decl_new_witness_table_entry,APIDigesterBreakage,"%0 now requires%select{|
7878

7979
ERROR(class_member_moved_to_extension,APIDigesterBreakage,"Non-final class member %0 is moved to extension", (StringRef))
8080

81-
WARNING(new_decl_without_intro,APIDigesterBreakage,"%0 is a new API without @available attribute", (StringRef))
81+
WARNING(new_decl_without_intro,APIDigesterBreakage,"%0 is a new API without '@available'", (StringRef))
8282

8383
ERROR(objc_name_change,APIDigesterBreakage,"%0 has ObjC name change from %1 to %2", (StringRef, StringRef, StringRef))
8484

test/api-digester/Inputs/stability-stdlib-abi-without-asserts-arm64.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ Constructor UInt8.init(exactly:) has mangled name changing from 'Swift.UInt8.ini
6060
Constructor UInt8.init(exactly:) has parameter 0 type change from Swift.Float80 to Swift.Float16
6161
Constructor _ExpressibleByBuiltinFloatLiteral.init(_builtinFloatLiteral:) has mangled name changing from 'Swift._ExpressibleByBuiltinFloatLiteral.init(_builtinFloatLiteral: Builtin.FPIEEE80) -> A' to 'Swift._ExpressibleByBuiltinFloatLiteral.init(_builtinFloatLiteral: Builtin.FPIEEE64) -> A'
6262
Constructor _ExpressibleByBuiltinFloatLiteral.init(_builtinFloatLiteral:) has parameter 0 type change from Builtin.FPIEEE80 to Builtin.FPIEEE64
63-
Func __VaListBuilder.allocStorage(wordCount:) is a new API without @available attribute
64-
Func __VaListBuilder.appendWords(_:) is a new API without @available attribute
65-
Func __VaListBuilder.deallocStorage(wordCount:storage:) is a new API without @available attribute
66-
Func __VaListBuilder.rawSizeAndAlignment(_:) is a new API without @available attribute
63+
Func __VaListBuilder.allocStorage(wordCount:) is a new API without '@available'
64+
Func __VaListBuilder.appendWords(_:) is a new API without '@available'
65+
Func __VaListBuilder.deallocStorage(wordCount:storage:) is a new API without '@available'
66+
Func __VaListBuilder.rawSizeAndAlignment(_:) is a new API without '@available'
6767
Func _cos(_:) has been removed
6868
Func _exp(_:) has been removed
6969
Func _exp2(_:) has been removed
@@ -75,14 +75,14 @@ Func _rint(_:) has been removed
7575
Func _sin(_:) has been removed
7676
Struct Float80 has been removed
7777
Struct __VaListBuilder.Header has been removed
78-
Var __VaListBuilder.allocated is a new API without @available attribute
78+
Var __VaListBuilder.allocated is a new API without '@available'
7979
Var __VaListBuilder.allocated is added to a non-resilient type
80-
Var __VaListBuilder.count is a new API without @available attribute
80+
Var __VaListBuilder.count is a new API without '@available'
8181
Var __VaListBuilder.count is added to a non-resilient type
8282
Var __VaListBuilder.fpRegistersUsed has been removed
8383
Var __VaListBuilder.gpRegistersUsed has been removed
8484
Var __VaListBuilder.header has been removed
85-
Var __VaListBuilder.requiredAlignmentInBytes is a new API without @available attribute
85+
Var __VaListBuilder.requiredAlignmentInBytes is a new API without '@available'
8686
Var __VaListBuilder.requiredAlignmentInBytes is added to a non-resilient type
8787
Var __VaListBuilder.storage has declared type change from Swift.ContiguousArray<Swift.Int> to Swift.UnsafeMutablePointer<Swift.Int>?
8888
Var __VaListBuilder.storage has mangled name changing from 'Swift.__VaListBuilder.storage : Swift.ContiguousArray<Swift.Int>' to 'Swift.__VaListBuilder.storage : Swift.Optional<Swift.UnsafeMutablePointer<Swift.Int>>'

test/api-digester/Outputs/Cake-abi.txt

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ cake: Constructor S1.init(_:) has parameter 0 type change from Swift.Int to Swif
4949
cake: Func C1.foo2(_:) has parameter 0 type change from Swift.Int to () -> ()
5050
cake: Func C7.foo(_:_:) has removed default argument from parameter 0
5151
cake: Func C7.foo(_:_:) has removed default argument from parameter 1
52-
cake: Func EscapingFunctionType.addedEscaping(_:) has added @escaping in parameter 0
53-
cake: Func EscapingFunctionType.removedEscaping(_:) has removed @escaping in parameter 0
52+
cake: Func EscapingFunctionType.addedEscaping(_:) has added '@escaping' in parameter 0
53+
cake: Func EscapingFunctionType.removedEscaping(_:) has removed '@escaping' in parameter 0
5454
cake: Func Somestruct2.foo1(_:) has parameter 0 type change from cake.C3 to cake.C1
5555
cake: Func Zoo.getCurrentAnimalInlinable() has return type change from [cake.Cat] to [cake.Dog]
5656
cake: Func ownershipChange(_:_:) has parameter 0 changing from InOut to Default
@@ -59,41 +59,41 @@ cake: Func returnFunctionTypeOwnershipChange() has return type change from (cake
5959
cake: Var Zoo.current has declared type change from cake.Cat to cake.Dog
6060

6161
/* Decl Attribute changes */
62-
cake: Accessor GlobalLetChangedToVar.Modify() is a new API without @available attribute
63-
cake: Accessor GlobalLetChangedToVar.Set() is a new API without @available attribute
64-
cake: Accessor fixedLayoutStruct2.BecomeFixedBinaryOrder.Modify() is a new API without @available attribute
65-
cake: Accessor fixedLayoutStruct2.BecomeFixedBinaryOrder.Set() is a new API without @available attribute
66-
cake: AssociatedType RequirementChanges.addedTypeWithDefault is a new API without @available attribute
67-
cake: AssociatedType RequirementChanges.addedTypeWithoutDefault is a new API without @available attribute
68-
cake: Class C0 is a new API without @available attribute
69-
cake: Class C8 is a new API without @available attribute
70-
cake: Constructor AddingNewDesignatedInit.init(_:) is a new API without @available attribute
71-
cake: Constructor C1.init(_:) is a new API without @available attribute
72-
cake: Constructor ClassWithMissingDesignatedInits.init() is a new API without @available attribute
73-
cake: Constructor SubclassWithMissingDesignatedInits.init() is a new API without @available attribute
62+
cake: Accessor GlobalLetChangedToVar.Modify() is a new API without '@available'
63+
cake: Accessor GlobalLetChangedToVar.Set() is a new API without '@available'
64+
cake: Accessor fixedLayoutStruct2.BecomeFixedBinaryOrder.Modify() is a new API without '@available'
65+
cake: Accessor fixedLayoutStruct2.BecomeFixedBinaryOrder.Set() is a new API without '@available'
66+
cake: AssociatedType RequirementChanges.addedTypeWithDefault is a new API without '@available'
67+
cake: AssociatedType RequirementChanges.addedTypeWithoutDefault is a new API without '@available'
68+
cake: Class C0 is a new API without '@available'
69+
cake: Class C8 is a new API without '@available'
70+
cake: Constructor AddingNewDesignatedInit.init(_:) is a new API without '@available'
71+
cake: Constructor C1.init(_:) is a new API without '@available'
72+
cake: Constructor ClassWithMissingDesignatedInits.init() is a new API without '@available'
73+
cake: Constructor SubclassWithMissingDesignatedInits.init() is a new API without '@available'
7474
cake: Enum IceKind is now without @frozen
75-
cake: EnumElement FrozenKind.AddedCase is a new API without @available attribute
76-
cake: EnumElement FutureKind.FineToAdd is a new API without @available attribute
75+
cake: EnumElement FrozenKind.AddedCase is a new API without '@available'
76+
cake: EnumElement FutureKind.FineToAdd is a new API without '@available'
7777
cake: Func C1.foo1() is now not static
7878
cake: Func FinalFuncContainer.NewFinalFunc() is now with final
7979
cake: Func FinalFuncContainer.NoLongerFinalFunc() is now without final
80-
cake: Func Float.floatHigher() is a new API without @available attribute
81-
cake: Func FutureKind.==(_:_:) is a new API without @available attribute
82-
cake: Func FutureKind.hash(into:) is a new API without @available attribute
80+
cake: Func Float.floatHigher() is a new API without '@available'
81+
cake: Func FutureKind.==(_:_:) is a new API without '@available'
82+
cake: Func FutureKind.hash(into:) is a new API without '@available'
8383
cake: Func HasMutatingMethodClone.foo() has self access kind changing from Mutating to NonMutating
84-
cake: Func RequirementChanges.addedFunc() is a new API without @available attribute
84+
cake: Func RequirementChanges.addedFunc() is a new API without '@available'
8585
cake: Func S1.foo1() has self access kind changing from NonMutating to Mutating
8686
cake: Func S1.foo3() is now static
8787
cake: Func _NoResilientClass.NoLongerFinalFunc() is now without final
88-
cake: Func fixedLayoutStruct.OKChange() is a new API without @available attribute
89-
cake: Protocol P4 is a new API without @available attribute
88+
cake: Func fixedLayoutStruct.OKChange() is a new API without '@available'
89+
cake: Protocol P4 is a new API without '@available'
9090
cake: Struct C6 is now with @frozen
9191
cake: Var C1.CIIns1 changes from weak to strong
9292
cake: Var C1.CIIns2 changes from strong to weak
93-
cake: Var FutureKind.hashValue is a new API without @available attribute
94-
cake: Var RequirementChanges.addedVar is a new API without @available attribute
95-
cake: Var fixedLayoutStruct.$__lazy_storage_$_lazy_d is a new API without @available attribute
96-
cake: Var fixedLayoutStruct.c is a new API without @available attribute
93+
cake: Var FutureKind.hashValue is a new API without '@available'
94+
cake: Var RequirementChanges.addedVar is a new API without '@available'
95+
cake: Var fixedLayoutStruct.$__lazy_storage_$_lazy_d is a new API without '@available'
96+
cake: Var fixedLayoutStruct.c is a new API without '@available'
9797

9898
/* Fixed-layout Type Changes */
9999
cake: EnumElement FrozenKind.AddedCase is added to a non-resilient type
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
cake: Func FrozenKind.__derived_enum_equals(_:_:) has been removed
2-
cake: Accessor GlobalLetChangedToVar.Get() is a new API without @available attribute
3-
cake: Accessor GlobalVarChangedToLet.Get() is a new API without @available attribute
4-
cake: Accessor GlobalVarChangedToLet.Modify() is a new API without @available attribute
5-
cake: Accessor GlobalVarChangedToLet.Set() is a new API without @available attribute
6-
cake: Func FrozenKind.==(_:_:) is a new API without @available attribute
2+
cake: Accessor GlobalLetChangedToVar.Get() is a new API without '@available'
3+
cake: Accessor GlobalVarChangedToLet.Get() is a new API without '@available'
4+
cake: Accessor GlobalVarChangedToLet.Modify() is a new API without '@available'
5+
cake: Accessor GlobalVarChangedToLet.Set() is a new API without '@available'
6+
cake: Func FrozenKind.==(_:_:) is a new API without '@available'
77
cake: Var C1.CIIns1 is no longer a stored property
88
cake: Var C1.CIIns2 is no longer a stored property
99
cake: Var RemoveSetters.Value is no longer a stored property
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Enum Color is a new API without @available attribute
1+
Enum Color is a new API without '@available'

test/api-digester/breakage-allowlist.swift

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

1313
// RUN: echo "ABI breakage: func foo() has been removed" > %t/incomplete-allowlist.txt
1414
// RUN: echo "ABI breakage: func foo() has been removed" > %t/complete-allowlist.txt
15-
// RUN: echo "ABI breakage: func bar() is a new API without @available attribute" >> %t/complete-allowlist.txt
15+
// RUN: echo "ABI breakage: func bar() is a new API without '@available'" >> %t/complete-allowlist.txt
1616

1717
// RUN: %target-swift-frontend -disable-objc-attr-requires-foundation-module -emit-module -o %t.mod1/Foo.swiftmodule %t.mod1/Foo.swift -parse-as-library -enable-library-evolution -emit-module-source-info -emit-module-source-info-path %t.mod1/Foo.swiftsourceinfo -emit-module-interface-path %t.mod1/Foo.swiftinterface -module-name Foo -swift-version 5
1818

test/api-digester/serialized-diagnostics.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
// RUN: c-index-test -read-diagnostics %t/result.dia 2>&1 | %FileCheck %s -check-prefix CHECK-DIA
1010

1111
// Ensure the 'api-digester-breaking-change' category is included in the serialized diagnostics file.
12-
// CHECK-DIA: warning: ABI breakage: enum Color is a new API without @available attribute [] [api-digester-breaking-change]
13-
// CHECK-STDERR: warning: ABI breakage: enum Color is a new API without @available attribute
12+
// CHECK-DIA: warning: ABI breakage: enum Color is a new API without '@available' [] [api-digester-breaking-change]
13+
// CHECK-STDERR: warning: ABI breakage: enum Color is a new API without '@available'

test/api-digester/stability-concurrency-abi.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Func SerialExecutor.enqueue(_:) has been added as a protocol requirement
111111
// while adding a new overload that accepts `Job` with new availability.
112112
// The ABI checker seems to be confused by this case.
113113
// rdar://106833284 (ABI checker confused with overload getting deprecated)
114-
Func Executor.enqueue(_:) is a new API without @available attribute
114+
Func Executor.enqueue(_:) is a new API without '@available'
115115

116116
// Adopt #isolation in TaskLocal.withValue APIs
117117
Func TaskLocal.withValue(_:operation:file:line:) has been renamed to Func withValue(_:operation:isolation:file:line:)

test/api-digester/stability-stdlib-abi-with-array-cow-checks.test

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@
5858

5959
// Note: normally you'll need to add new entries to
6060
// `stability-stdlib-abi-without-asserts.test`, not this file.
61-
Func _COWChecksEnabled() is a new API without @available attribute
62-
Func _swift_isImmutableCOWBuffer(_:) is a new API without @available attribute
63-
Func _swift_setImmutableCOWBuffer(_:_:) is a new API without @available attribute
61+
Func _COWChecksEnabled() is a new API without '@available'
62+
Func _swift_isImmutableCOWBuffer(_:) is a new API without '@available'
63+
Func _swift_setImmutableCOWBuffer(_:_:) is a new API without '@available'
6464

6565
// *** DO NOT DISABLE OR XFAIL THIS TEST. *** (See comment above.)

test/api-digester/stability-stdlib-abi-with-asserts.test

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@
5858

5959
// Note: normally you'll need to add new entries to
6060
// `stability-stdlib-abi-without-asserts.test`, not this file.
61-
Func _collectReferencesInsideObject(_:) is a new API without @available attribute
62-
Func _loadDestroyTLSCounter() is a new API without @available attribute
63-
Func _measureRuntimeFunctionCountersDiffs(objects:_:) is a new API without @available attribute
64-
Protocol _RuntimeFunctionCountersStats is a new API without @available attribute
65-
Struct _GlobalRuntimeFunctionCountersState is a new API without @available attribute
66-
Struct _ObjectRuntimeFunctionCountersState is a new API without @available attribute
67-
Struct _RuntimeFunctionCounters is a new API without @available attribute
61+
Func _collectReferencesInsideObject(_:) is a new API without '@available'
62+
Func _loadDestroyTLSCounter() is a new API without '@available'
63+
Func _measureRuntimeFunctionCountersDiffs(objects:_:) is a new API without '@available'
64+
Protocol _RuntimeFunctionCountersStats is a new API without '@available'
65+
Struct _GlobalRuntimeFunctionCountersState is a new API without '@available'
66+
Struct _ObjectRuntimeFunctionCountersState is a new API without '@available'
67+
Struct _RuntimeFunctionCounters is a new API without '@available'
6868

6969
// *** DO NOT DISABLE OR XFAIL THIS TEST. *** (See comment above.)
7070

test/api-digester/stability-stdlib-abi-without-asserts.test

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,18 @@
4949

5050
// *** DO NOT DISABLE OR XFAIL THIS TEST. *** (See comment above.)
5151

52-
Func _prespecialize() is a new API without @available attribute
53-
Func _stdlib_isOSVersionAtLeastOrVariantVersionAtLeast(_:_:_:_:_:_:) is a new API without @available attribute
54-
Func _diagnoseUnavailableCodeReached() is a new API without @available attribute
52+
Func _prespecialize() is a new API without '@available'
53+
Func _stdlib_isOSVersionAtLeastOrVariantVersionAtLeast(_:_:_:_:_:_:) is a new API without '@available'
54+
Func _diagnoseUnavailableCodeReached() is a new API without '@available'
5555

5656
// These functions are not actually added to the ABI, but they had been a part of
5757
// the ABI exposed by the runtime library, so this is not breakage.
5858
// They are now referenced by @_extern(c) declarations in the standard library, but
5959
// api-digester cannot match them with the baseline symbols in the baseline runtime
6060
// library, which were not exposed by the baseline stdlib module.
61-
Func _swift_retainCount(_:) is a new API without @available attribute
62-
Func _swift_unownedRetainCount(_:) is a new API without @available attribute
63-
Func _swift_weakRetainCount(_:) is a new API without @available attribute
61+
Func _swift_retainCount(_:) is a new API without '@available'
62+
Func _swift_unownedRetainCount(_:) is a new API without '@available'
63+
Func _swift_weakRetainCount(_:) is a new API without '@available'
6464
// And these were temporarily added as ABI in https://github.com/apple/swift/pull/69352,
6565
// but then https://github.com/apple/swift/pull/71694 made them @_aeic before
6666
// they shipped anywhere, but not before they got into the ABI baseline. Fun!
@@ -130,13 +130,13 @@ Func _SequenceBox._map(_:) is now without rethrows
130130
Func UnsafeMutableRawBufferPointer.storeBytes(of:toByteOffset:as:) has been removed
131131
Func UnsafeMutableRawPointer.storeBytes(of:toByteOffset:as:) has been removed
132132
Func UnsafeMutableBufferPointer.assign(repeating:) has been removed
133-
Func UnsafeMutableBufferPointer.update(repeating:) is a new API without @available attribute
133+
Func UnsafeMutableBufferPointer.update(repeating:) is a new API without '@available'
134134
Func UnsafeMutablePointer.assign(from:count:) has been removed
135-
Func UnsafeMutablePointer.update(from:count:) is a new API without @available attribute
135+
Func UnsafeMutablePointer.update(from:count:) is a new API without '@available'
136136
Func UnsafeMutablePointer.assign(repeating:count:) has been removed
137-
Func UnsafeMutablePointer.update(repeating:count:) is a new API without @available attribute
137+
Func UnsafeMutablePointer.update(repeating:count:) is a new API without '@available'
138138
Func UnsafeMutablePointer.moveAssign(from:count:) has been removed
139-
Func UnsafeMutablePointer.moveUpdate(from:count:) is a new API without @available attribute
139+
Func UnsafeMutablePointer.moveUpdate(from:count:) is a new API without '@available'
140140

141141
// These haven't actually been removed; they were renamed at the source level while
142142
// retaining their old mangled name. The source break was accepted as part of se-0370.
@@ -146,7 +146,7 @@ Func UnsafeMutableBufferPointer.initialize(from:) has return type change from (
146146
// This hasn't actually been removed; it was renamed at the source level while
147147
// retaining its old mangled/silgen name. The old source-level name is preserved
148148
// as an @_alwaysEmitIntoClient function. The source break was accepted as part of se-0405.
149-
Constructor String.init(validatingCString:) is a new API without @available attribute
149+
Constructor String.init(validatingCString:) is a new API without '@available'
150150
Constructor String.init(validatingUTF8:) has been removed
151151

152152
// These haven't actually been removed; they are simply marked unavailable.
@@ -826,9 +826,9 @@ Struct String.Index has added a conformance to an existing protocol CustomDebugS
826826

827827
Struct CollectionOfOne is now with @_addressableForDependencies
828828

829-
Enum _SwiftifyInfo is a new API without @available attribute
830-
Enum _SwiftifyExpr is a new API without @available attribute
831-
Enum _DependenceType is a new API without @available attribute
829+
Enum _SwiftifyInfo is a new API without '@available'
830+
Enum _SwiftifyExpr is a new API without '@available'
831+
Enum _DependenceType is a new API without '@available'
832832

833833
Protocol CodingKey has added inherited protocol SendableMetatype
834834
Protocol Error has added inherited protocol SendableMetatype

0 commit comments

Comments
 (0)