Skip to content

Commit 180693b

Browse files
authored
Merge pull request #82453 from azarovalex/fix-overridden-typo
[Diagnostics] Fix typo in 'overridden' warning message and identifier
2 parents 7f7a5b1 + 1b0c6bd commit 180693b

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

include/swift/AST/DiagnosticsFrontend.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ WARNING(ignoring_option_obsolete,none,
195195
"ignoring '%0'; this option is obsolete", (StringRef))
196196
WARNING(ignoring_option_requires_option,none,
197197
"ignoring %0 (requires %1)", (StringRef, StringRef))
198-
WARNING(warn_ignore_option_overriden_by,none,
199-
"ignoring %0 (overriden by %1)", (StringRef, StringRef))
198+
WARNING(warn_ignore_option_overridden_by,none,
199+
"ignoring %0 (overridden by %1)", (StringRef, StringRef))
200200

201201
WARNING(warn_implicit_concurrency_import_failed,none,
202202
"unable to perform implicit import of \"_Concurrency\" module: no such module found", ())

lib/Frontend/CompilerInvocation.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1487,7 +1487,7 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
14871487
if (Opts.AllowNonResilientAccess) {
14881488
// Override the option to skip non-exportable decls.
14891489
if (Opts.SkipNonExportableDecls) {
1490-
Diags.diagnose(SourceLoc(), diag::warn_ignore_option_overriden_by,
1490+
Diags.diagnose(SourceLoc(), diag::warn_ignore_option_overridden_by,
14911491
"-experimental-skip-non-exportable-decls",
14921492
"-allow-non-resilient-access");
14931493
Opts.SkipNonExportableDecls = false;
@@ -1498,7 +1498,7 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
14981498
FrontendOpts.RequestedAction)) {
14991499
if (FrontendOpts.RequestedAction !=
15001500
FrontendOptions::ActionType::TypecheckModuleFromInterface)
1501-
Diags.diagnose(SourceLoc(), diag::warn_ignore_option_overriden_by,
1501+
Diags.diagnose(SourceLoc(), diag::warn_ignore_option_overridden_by,
15021502
"-allow-non-resilient-access",
15031503
"-compile-module-from-interface");
15041504
Opts.AllowNonResilientAccess = false;
@@ -1960,7 +1960,7 @@ static bool ParseTypeCheckerArgs(TypeCheckerOptions &Opts, ArgList &Args,
19601960
if (Args.hasArg(
19611961
OPT_experimental_skip_non_inlinable_function_bodies_without_types)) {
19621962
if (LangOpts.AllowNonResilientAccess)
1963-
Diags.diagnose(SourceLoc(), diag::warn_ignore_option_overriden_by,
1963+
Diags.diagnose(SourceLoc(), diag::warn_ignore_option_overridden_by,
19641964
"-experimental-skip-non-inlinable-function-bodies-without-types",
19651965
"-allow-non-resilient-access");
19661966
else
@@ -1971,7 +1971,7 @@ static bool ParseTypeCheckerArgs(TypeCheckerOptions &Opts, ArgList &Args,
19711971
// body skipping.
19721972
if (Args.hasArg(OPT_experimental_skip_non_inlinable_function_bodies)) {
19731973
if (LangOpts.AllowNonResilientAccess)
1974-
Diags.diagnose(SourceLoc(), diag::warn_ignore_option_overriden_by,
1974+
Diags.diagnose(SourceLoc(), diag::warn_ignore_option_overridden_by,
19751975
"-experimental-skip-non-inlinable-function-bodies",
19761976
"-allow-non-resilient-access");
19771977
else
@@ -1980,7 +1980,7 @@ static bool ParseTypeCheckerArgs(TypeCheckerOptions &Opts, ArgList &Args,
19801980

19811981
if (Args.hasArg(OPT_tbd_is_installapi)) {
19821982
if (LangOpts.AllowNonResilientAccess)
1983-
Diags.diagnose(SourceLoc(), diag::warn_ignore_option_overriden_by,
1983+
Diags.diagnose(SourceLoc(), diag::warn_ignore_option_overridden_by,
19841984
"-tbd-is-installapi",
19851985
"-allow-non-resilient-access");
19861986
else
@@ -1989,7 +1989,7 @@ static bool ParseTypeCheckerArgs(TypeCheckerOptions &Opts, ArgList &Args,
19891989

19901990
if (Args.hasArg(OPT_experimental_skip_all_function_bodies)) {
19911991
if (LangOpts.AllowNonResilientAccess)
1992-
Diags.diagnose(SourceLoc(), diag::warn_ignore_option_overriden_by,
1992+
Diags.diagnose(SourceLoc(), diag::warn_ignore_option_overridden_by,
19931993
"-experimental-skip-all-function-bodies",
19941994
"-allow-non-resilient-access");
19951995
else
@@ -2063,7 +2063,7 @@ static bool ParseTypeCheckerArgs(TypeCheckerOptions &Opts, ArgList &Args,
20632063

20642064
if (LangOpts.AllowNonResilientAccess &&
20652065
Opts.EnableLazyTypecheck) {
2066-
Diags.diagnose(SourceLoc(), diag::warn_ignore_option_overriden_by,
2066+
Diags.diagnose(SourceLoc(), diag::warn_ignore_option_overridden_by,
20672067
"-experimental-lazy-typecheck",
20682068
"-allow-non-resilient-access");
20692069
Opts.EnableLazyTypecheck = false;

test/SILGen/package_allow_non_resilient_access.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
// RUN: -experimental-allow-non-resilient-access \
4545
// RUN: -emit-module -emit-module-path %t/Utils.swiftmodule \
4646
// RUN: 2>&1 | %FileCheck %s --check-prefix=CHECK-DIAG-1
47-
// CHECK-DIAG-1: warning: ignoring -experimental-skip-non-exportable-decls (overriden by -allow-non-resilient-access)
47+
// CHECK-DIAG-1: warning: ignoring -experimental-skip-non-exportable-decls (overridden by -allow-non-resilient-access)
4848
// RUN: llvm-bcanalyzer --dump %t/Utils.swiftmodule | %FileCheck %s --check-prefix=CHECK-ON
4949

5050
/// Override -experimental-skip-non-inlinable-function-bodies-without-types with warning
@@ -57,7 +57,7 @@
5757
// RUN: -experimental-allow-non-resilient-access \
5858
// RUN: -emit-module -emit-module-path %t/Utils.swiftmodule \
5959
// RUN: 2>&1 | %FileCheck %s --check-prefix=CHECK-DIAG-2
60-
// CHECK-DIAG-2: warning: ignoring -experimental-skip-non-inlinable-function-bodies-without-types (overriden by -allow-non-resilient-access)
60+
// CHECK-DIAG-2: warning: ignoring -experimental-skip-non-inlinable-function-bodies-without-types (overridden by -allow-non-resilient-access)
6161
// RUN: llvm-bcanalyzer --dump %t/Utils.swiftmodule | %FileCheck %s --check-prefix=CHECK-ON
6262

6363
/// Override -experimental-skip-non-inlinable-function-bodies with warning
@@ -70,7 +70,7 @@
7070
// RUN: -experimental-allow-non-resilient-access \
7171
// RUN: -emit-module -emit-module-path %t/Utils.swiftmodule \
7272
// RUN: 2>&1 | %FileCheck %s --check-prefix=CHECK-DIAG-3
73-
// CHECK-DIAG-3: warning: ignoring -experimental-skip-non-inlinable-function-bodies (overriden by -allow-non-resilient-access)
73+
// CHECK-DIAG-3: warning: ignoring -experimental-skip-non-inlinable-function-bodies (overridden by -allow-non-resilient-access)
7474
// RUN: llvm-bcanalyzer --dump %t/Utils.swiftmodule | %FileCheck %s --check-prefix=CHECK-ON
7575

7676
/// Override -experimental-skip-all-function-bodies with warning
@@ -83,7 +83,7 @@
8383
// RUN: -experimental-allow-non-resilient-access \
8484
// RUN: -emit-module -emit-module-path %t/Utils.swiftmodule \
8585
// RUN: 2>&1 | %FileCheck %s --check-prefix=CHECK-DIAG-4
86-
// CHECK-DIAG-4: warning: ignoring -experimental-skip-all-function-bodies (overriden by -allow-non-resilient-access)
86+
// CHECK-DIAG-4: warning: ignoring -experimental-skip-all-function-bodies (overridden by -allow-non-resilient-access)
8787
// RUN: llvm-bcanalyzer --dump %t/Utils.swiftmodule | %FileCheck %s --check-prefix=CHECK-ON
8888

8989
/// Override -experimental-lazy-typecheck with warning
@@ -96,7 +96,7 @@
9696
// RUN: -experimental-allow-non-resilient-access \
9797
// RUN: -emit-module -emit-module-path %t/Utils.swiftmodule \
9898
// RUN: 2>&1 | %FileCheck %s --check-prefix=CHECK-DIAG-5
99-
// CHECK-DIAG-5: warning: ignoring -experimental-lazy-typecheck (overriden by -allow-non-resilient-access)
99+
// CHECK-DIAG-5: warning: ignoring -experimental-lazy-typecheck (overridden by -allow-non-resilient-access)
100100
// RUN: llvm-bcanalyzer --dump %t/Utils.swiftmodule | %FileCheck %s --check-prefix=CHECK-ON
101101

102102
/// Override -tbd-is-installapi with warning
@@ -109,7 +109,7 @@
109109
// RUN: -experimental-allow-non-resilient-access \
110110
// RUN: -emit-module -emit-module-path %t/Utils.swiftmodule \
111111
// RUN: 2>&1 | %FileCheck %s --check-prefix=CHECK-DIAG-TBD
112-
// CHECK-DIAG-TBD: warning: ignoring -tbd-is-installapi (overriden by -allow-non-resilient-access)
112+
// CHECK-DIAG-TBD: warning: ignoring -tbd-is-installapi (overridden by -allow-non-resilient-access)
113113
// RUN: llvm-bcanalyzer --dump %t/Utils.swiftmodule | %FileCheck %s --check-prefix=CHECK-ON
114114

115115
/// Build Utils interface files.
@@ -130,7 +130,7 @@
130130
// RUN: -allow-non-resilient-access \
131131
// RUN: %t/Utils.package.swiftinterface -o %t/Utils.swiftmodule \
132132
// RUN: 2>&1 | %FileCheck %s --check-prefix=CHECK-DIAG-INTERFACE
133-
// CHECK-DIAG-INTERFACE: warning: ignoring -allow-non-resilient-access (overriden by -compile-module-from-interface)
133+
// CHECK-DIAG-INTERFACE: warning: ignoring -allow-non-resilient-access (overridden by -compile-module-from-interface)
134134
// RUN: llvm-bcanalyzer --dump %t/Utils.swiftmodule | %FileCheck %s --check-prefix=CHECK-OFF
135135
// CHECK-OFF-NOT: ALLOW_NON_RESILIENT_ACCESS
136136

0 commit comments

Comments
 (0)