Diagnose the use of -disable-access-checking with strict safety checking

This commit is contained in:
Doug Gregor
2025-01-08 09:47:17 -08:00
parent 6855dc474f
commit c9b2d8ba5f
3 changed files with 14 additions and 5 deletions

View File

@@ -3840,7 +3840,15 @@ bool CompilerInvocation::parseArgs(
if (LangOpts.hasFeature(Feature::WarnUnsafe)) {
if (SILOpts.RemoveRuntimeAsserts ||
SILOpts.AssertConfig == SILOptions::Unchecked) {
Diags.diagnose(SourceLoc(), diag::Ounchecked_with_strict_safety);
Diags.diagnose(SourceLoc(),
diag::command_line_conflicts_with_strict_safety,
"-Ounchecked");
}
if (!LangOpts.EnableAccessControl) {
Diags.diagnose(SourceLoc(),
diag::command_line_conflicts_with_strict_safety,
"-disable-access-control");
}
}