Merge pull request #85833 from swiftlang/jepa-main

[NFC] "SwiftVersion" → "LanguageMode" in `DiagnosticEngine::warnUntilSwiftVersion`, etc.
This commit is contained in:
Anthony Latsis
2025-12-05 09:34:30 +00:00
committed by GitHub
67 changed files with 402 additions and 392 deletions

View File

@@ -1803,7 +1803,7 @@ bool MissingOptionalUnwrapFailure::diagnoseAsError() {
auto *unwrappedExpr = anchor->getValueProvidingExpr();
if (auto *tryExpr = dyn_cast<OptionalTryExpr>(unwrappedExpr)) {
bool isSwift5OrGreater = getASTContext().isSwiftVersionAtLeast(5);
bool isSwift5OrGreater = getASTContext().isLanguageModeAtLeast(5);
auto subExprType = getType(tryExpr->getSubExpr());
bool subExpressionIsOptional = (bool)subExprType->getOptionalObjectType();
@@ -8148,7 +8148,7 @@ bool SendingMismatchFailure::diagnoseAsError() {
bool SendingMismatchFailure::diagnoseArgFailure() {
emitDiagnostic(diag::sending_function_wrong_sending, getFromType(),
getToType())
.warnUntilSwiftVersion(6);
.warnUntilLanguageMode(6);
emitDiagnostic(diag::sending_function_param_with_sending_param_note);
return true;
}
@@ -8156,7 +8156,7 @@ bool SendingMismatchFailure::diagnoseArgFailure() {
bool SendingMismatchFailure::diagnoseResultFailure() {
emitDiagnostic(diag::sending_function_wrong_sending, getFromType(),
getToType())
.warnUntilSwiftVersion(6);
.warnUntilLanguageMode(6);
emitDiagnostic(diag::sending_function_result_with_sending_param_note);
return true;
}
@@ -9411,7 +9411,7 @@ bool InvalidWeakAttributeUse::diagnoseAsError() {
bool TupleLabelMismatchWarning::diagnoseAsError() {
emitDiagnostic(diag::tuple_label_mismatch, getFromType(), getToType())
.highlight(getSourceRange())
.warnUntilFutureSwiftVersion();
.warnUntilFutureLanguageMode();
return true;
}