Skip to content

Commit 992fc6c

Browse files
author
Joshua Turcotti
authored
Merge pull request #67318 from JTurcotti/better-diags
[SendNonSendable] Diagnose consumption sites not requirement sites for flow-sensitive region-based Sendable Analysis
2 parents 0c4d4d9 + 55e8f9f commit 992fc6c

File tree

5 files changed

+1164
-502
lines changed

5 files changed

+1164
-502
lines changed

include/swift/AST/DiagnosticsSIL.def

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -865,9 +865,13 @@ NOTE(sil_referencebinding_inout_binding_here, none,
865865
// Warnings arising from the flow-sensitive checking of Sendability of
866866
// non-Sendable values
867867
WARNING(consumed_value_used, none,
868-
"Non-Sendable value consumed, then used at this site; could yield race with another thread", ())
868+
"non-Sendable value consumed, then used at this site; could yield race with another thread", ())
869869
WARNING(arg_region_consumed, none,
870-
"This application could pass `self` or a Non-Sendable argument of this function to another thread, potentially yielding a race with the caller", ())
870+
"this application could pass `self` or a Non-Sendable argument of this function to another thread, potentially yielding a race with the caller", ())
871+
WARNING(consumption_yields_race, none,
872+
"non-Sendable value sent across isolation domains here, but could be accessed later in this function (%0 access site%select{|s}1 displayed%select{|, %3 more hidden}2)", (unsigned, bool, bool, unsigned))
873+
NOTE(possible_racy_access_site, none,
874+
"access here could race with non-Sendable value send above", ())
871875

872876
#define UNDEFINE_DIAGNOSTIC_MACROS
873877
#include "DefineDiagnosticMacros.h"

0 commit comments

Comments
 (0)