Skip to content

Commit 47bed40

Browse files
committed
Add group for sending-closure-risks-data-race.md
Also adds a parent `RegionIsolation` group to link both `SendingRisksDataRace` and the newly added `SendingClosureRisksDataRace`.
1 parent f8bfa6c commit 47bed40

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

include/swift/AST/DiagnosticGroups.def

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,12 @@ GROUP(PerformanceHints, "performance-hints")
6969
GROUP(PreconcurrencyImport, "preconcurrency-import")
7070
GROUP(PropertyWrappers, "property-wrapper-requirements")
7171
GROUP(ProtocolTypeNonConformance, "protocol-type-non-conformance")
72+
GROUP(RegionIsolation, "region-isolation")
7273
GROUP(ResultBuilderMethods, "result-builder-methods")
7374
GROUP(ReturnTypeImplicitCopy, "return-type-implicit-copy")
7475
GROUP(SendableClosureCaptures, "sendable-closure-captures")
7576
GROUP(SendableMetatypes, "sendable-metatypes")
77+
GROUP(SendingClosureRisksDataRace, "sending-closure-risks-data-race")
7678
GROUP(SendingRisksDataRace, "sending-risks-data-race")
7779
GROUP(StrictLanguageFeatures, "strict-language-features")
7880
GROUP(StrictMemorySafety, "strict-memory-safety")
@@ -85,5 +87,8 @@ GROUP(WeakMutability, "weak-mutability")
8587
GROUP_LINK(PerformanceHints, ExistentialType)
8688
GROUP_LINK(PerformanceHints, ReturnTypeImplicitCopy)
8789

90+
GROUP_LINK(RegionIsolation, SendingClosureRisksDataRace)
91+
GROUP_LINK(RegionIsolation, SendingRisksDataRace)
92+
8893
#define UNDEFINE_DIAGNOSTIC_GROUPS_MACROS
8994
#include "swift/AST/DefineDiagnosticGroupsMacros.h"

include/swift/AST/DiagnosticsSIL.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@ NOTE(regionbasedisolation_typed_tns_passed_to_sending, none,
10751075
"causing races inbetween %0 uses and uses reachable from the callee",
10761076
(StringRef, Type))
10771077

1078-
ERROR(regionbasedisolation_typed_tns_passed_sending_closure, none,
1078+
GROUPED_ERROR(regionbasedisolation_typed_tns_passed_sending_closure, SendingClosureRisksDataRace, none,
10791079
"passing closure as a 'sending' parameter risks causing data races between %0 and concurrent execution of the closure",
10801080
(StringRef))
10811081
NOTE(regionbasedisolation_typed_tns_passed_to_sending_closure_helper_have_value, none,

0 commit comments

Comments
 (0)