mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
add an experimental feature DeferSendableChecking to defer the sendable checking of some sites. For now, only diagnostics corresponding to non-sendable arguments passed to calls with unsatisfied isolation are deferred. A SIL pass SendNonSendable is added to emit the deferred diagnostics, and ApplyExpr is appropriately enriched to make that deferral possible.
This commit is contained in:
@@ -2715,6 +2715,25 @@ public:
|
||||
PrintWithColorRAII(OS, ExprModifierColor)
|
||||
<< (E->throws() ? " throws" : " nothrow");
|
||||
}
|
||||
PrintWithColorRAII(OS, ExprModifierColor)
|
||||
<< " isolationCrossing=";
|
||||
auto isolationCrossing = E->getIsolationCrossing();
|
||||
if (isolationCrossing.has_value()) {
|
||||
PrintWithColorRAII(OS, ExprModifierColor)
|
||||
<< "{caller='";
|
||||
simple_display(PrintWithColorRAII(OS, ExprModifierColor).getOS(),
|
||||
isolationCrossing.value().getCallerIsolation());
|
||||
PrintWithColorRAII(OS, ExprModifierColor)
|
||||
<< "', callee='";
|
||||
simple_display(PrintWithColorRAII(OS, ExprModifierColor).getOS(),
|
||||
isolationCrossing.value().getCalleeIsolation());
|
||||
|
||||
PrintWithColorRAII(OS, ExprModifierColor)
|
||||
<< "'}";
|
||||
} else {
|
||||
PrintWithColorRAII(OS, ExprModifierColor)
|
||||
<< "none";
|
||||
}
|
||||
OS << '\n';
|
||||
printRec(E->getFn());
|
||||
OS << '\n';
|
||||
|
||||
Reference in New Issue
Block a user