mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Diagnose the combination of -Ounchecked with strict memory safety
Aligns with the current proposal and fixes rdar://127128995
This commit is contained in:
@@ -3834,6 +3834,13 @@ bool CompilerInvocation::parseArgs(
|
||||
}
|
||||
}
|
||||
|
||||
if (LangOpts.hasFeature(Feature::WarnUnsafe)) {
|
||||
if (SILOpts.RemoveRuntimeAsserts ||
|
||||
SILOpts.AssertConfig == SILOptions::Unchecked) {
|
||||
Diags.diagnose(SourceLoc(), diag::Ounchecked_with_strict_safety);
|
||||
}
|
||||
}
|
||||
|
||||
SILOpts.UseAggressiveReg2MemForCodeSize =
|
||||
ParsedArgs.hasFlag(OPT_enable_aggressive_reg2mem,
|
||||
OPT_disable_aggressive_reg2mem,
|
||||
|
||||
Reference in New Issue
Block a user