mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #85833 from swiftlang/jepa-main
[NFC] "SwiftVersion" → "LanguageMode" in `DiagnosticEngine::warnUntilSwiftVersion`, etc.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user