Skip to content

Commit 29626c4

Browse files
committed
[NFC] Diag: Rename error_in_future_swift_version wrappers
Be clear that these are about language mode.
1 parent 1573344 commit 29626c4

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

include/swift/AST/DiagnosticsCommon.def

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ ERROR(error_no_group_info,none,
4747
NOTE(brace_stmt_suggest_do,none,
4848
"did you mean to use a 'do' statement?", ())
4949

50-
// `error_in_future_swift_version` does not have a group because warnings of this kind
51-
// inherit the group from the wrapped error.
52-
WARNING(error_in_future_swift_version,none,
50+
// This does not have a group because warnings of this kind inherit the group
51+
// from the wrapped error.
52+
WARNING(error_in_swift_lang_mode,none,
5353
"%0; this is an error in the Swift %1 language mode",
5454
(DiagnosticInfo *, unsigned))
5555

56-
// `error_in_a_future_swift_version` does not have a group because warnings of this kind
57-
// inherit the group from the wrapped error.
58-
WARNING(error_in_a_future_swift_version,none,
56+
// This does not have a group because warnings of this kind inherit the group
57+
// from the wrapped error.
58+
WARNING(error_in_a_future_swift_lang_mode,none,
5959
"%0; this will be an error in a future Swift language mode",
6060
(DiagnosticInfo *))
6161

include/swift/AST/EducationalNotes.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ EDUCATIONAL_NOTES(result_builder_missing_build_array,
8686
EDUCATIONAL_NOTES(multiple_inheritance,
8787
"multiple-inheritance.md")
8888

89-
EDUCATIONAL_NOTES(error_in_future_swift_version,
89+
EDUCATIONAL_NOTES(error_in_swift_lang_mode,
9090
"error-in-future-swift-version.md")
9191

9292
#undef EDUCATIONAL_NOTES

lib/AST/DiagnosticEngine.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,9 +431,9 @@ InFlightDiagnostic::limitBehaviorUntilSwiftVersion(
431431
// wrapIn will result in the behavior of the wrapping diagnostic.
432432
if (limit >= DiagnosticBehavior::Warning) {
433433
if (majorVersion > 6) {
434-
wrapIn(diag::error_in_a_future_swift_version);
434+
wrapIn(diag::error_in_a_future_swift_lang_mode);
435435
} else {
436-
wrapIn(diag::error_in_future_swift_version, majorVersion);
436+
wrapIn(diag::error_in_swift_lang_mode, majorVersion);
437437
}
438438
}
439439

unittests/AST/DiagnosticGroupsTests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ TEST(DiagnosticGroups, DiagnosticsWrappersInheritGroups) {
105105
.limitBehaviorUntilSwiftVersion(DiagnosticBehavior::Warning, 99);
106106
},
107107
[](const DiagnosticInfo &info) {
108-
EXPECT_EQ(info.ID, diag::error_in_a_future_swift_version.ID);
108+
EXPECT_EQ(info.ID, diag::error_in_a_future_swift_lang_mode.ID);
109109
EXPECT_TRUE(info.FormatString.ends_with(" [DeprecatedDeclaration]"));
110110
},
111111
/*expectedNumCallbackCalls=*/1);

0 commit comments

Comments
 (0)