Skip to content

[SendNonSendable] Diagnose consumption sites not requirement sites #67318

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions include/swift/AST/DiagnosticsSIL.def
Original file line number Diff line number Diff line change
Expand Up @@ -859,9 +859,13 @@ NOTE(sil_referencebinding_inout_binding_here, none,
// Warnings arising from the flow-sensitive checking of Sendability of
// non-Sendable values
WARNING(consumed_value_used, none,
"Non-Sendable value consumed, then used at this site; could yield race with another thread", ())
"non-Sendable value consumed, then used at this site; could yield race with another thread", ())
WARNING(arg_region_consumed, none,
"This application could pass `self` or a Non-Sendable argument of this function to another thread, potentially yielding a race with the caller", ())
"this application could pass `self` or a Non-Sendable argument of this function to another thread, potentially yielding a race with the caller", ())
WARNING(consumption_yields_race, none,
"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))
NOTE(possible_racy_access_site, none,
"access here could race with non-Sendable value send above", ())

#define UNDEFINE_DIAGNOSTIC_MACROS
#include "DefineDiagnosticMacros.h"
Loading