Skip to content

Commit 5a45fed

Browse files
committed
[clang][NFC] Fix typo in -Ofast deprecation warning
A follow-up for #98736
1 parent 6cc8774 commit 5a45fed

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

clang/include/clang/Basic/DiagnosticDriverKinds.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ def warn_drv_deprecated_arg_no_relaxed_template_template_args : Warning<
445445
"argument '-fno-relaxed-template-template-args' is deprecated">,
446446
InGroup<DeprecatedNoRelaxedTemplateTemplateArgs>;
447447
def warn_drv_deprecated_arg_ofast : Warning<
448-
"argument '-Ofast' is deprecated; use '-O3 -ffast math' for the same behavior,"
448+
"argument '-Ofast' is deprecated; use '-O3 -ffast-math' for the same behavior,"
449449
" or '-O3' to enable only conforming optimizations">,
450450
InGroup<DeprecatedOFast>;
451451
def warn_drv_deprecated_custom : Warning<

clang/include/clang/Driver/Options.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,7 @@ def O_flag : Flag<["-"], "O">, Visibility<[ClangOption, CC1Option, FC1Option]>,
932932
Alias<O>, AliasArgs<["1"]>;
933933
def Ofast : Joined<["-"], "Ofast">, Group<O_Group>,
934934
Visibility<[ClangOption, CC1Option, FlangOption]>,
935-
HelpText<"Deprecated; use '-O3 -ffast math' for the same behavior,"
935+
HelpText<"Deprecated; use '-O3 -ffast-math' for the same behavior,"
936936
" or '-O3' to enable only conforming optimizations">;
937937
def P : Flag<["-"], "P">,
938938
Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>,

clang/test/Driver/Ofast.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// RUN: %clang -Ofast -fno-strict-aliasing -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST-NO-STRICT-ALIASING %s
1111
// RUN: %clang -Ofast -fno-vectorize -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST-NO-VECTORIZE %s
1212

13-
// CHECK-OFAST: use '-O3 -ffast math' for the same behavior, or '-O3' to enable only conforming optimizations
13+
// CHECK-OFAST: use '-O3 -ffast-math' for the same behavior, or '-O3' to enable only conforming optimizations
1414
// CHECK-OFAST: -cc1
1515
// CHECK-OFAST-NOT: -relaxed-aliasing
1616
// CHECK-OFAST: -ffast-math
@@ -25,21 +25,21 @@
2525
// CHECK-OFAST-O2-NOT: -Ofast
2626
// CHECK-OFAST-O2: -vectorize-loops
2727

28-
// CHECK-OFAST-NO-FAST-MATH: use '-O3 -ffast math' for the same behavior, or '-O3' to enable only conforming optimizations
28+
// CHECK-OFAST-NO-FAST-MATH: use '-O3 -ffast-math' for the same behavior, or '-O3' to enable only conforming optimizations
2929
// CHECK-OFAST-NO-FAST-MATH: -cc1
3030
// CHECK-OFAST-NO-FAST-MATH-NOT: -relaxed-aliasing
3131
// CHECK-OFAST-NO-FAST-MATH-NOT: -ffast-math
3232
// CHECK-OFAST-NO-FAST-MATH: -Ofast
3333
// CHECK-OFAST-NO-FAST-MATH: -vectorize-loops
3434

35-
// CHECK-OFAST-NO-STRICT-ALIASING: use '-O3 -ffast math' for the same behavior, or '-O3' to enable only conforming optimizations
35+
// CHECK-OFAST-NO-STRICT-ALIASING: use '-O3 -ffast-math' for the same behavior, or '-O3' to enable only conforming optimizations
3636
// CHECK-OFAST-NO-STRICT-ALIASING: -cc1
3737
// CHECK-OFAST-NO-STRICT-ALIASING: -relaxed-aliasing
3838
// CHECK-OFAST-NO-STRICT-ALIASING: -ffast-math
3939
// CHECK-OFAST-NO-STRICT-ALIASING: -Ofast
4040
// CHECK-OFAST-NO-STRICT-ALIASING: -vectorize-loops
4141

42-
// CHECK-OFAST-NO-VECTORIZE: use '-O3 -ffast math' for the same behavior, or '-O3' to enable only conforming optimizations
42+
// CHECK-OFAST-NO-VECTORIZE: use '-O3 -ffast-math' for the same behavior, or '-O3' to enable only conforming optimizations
4343
// CHECK-OFAST-NO-VECTORIZE: -cc1
4444
// CHECK-OFAST-NO-VECTORIZE-NOT: -relaxed-aliasing
4545
// CHECK-OFAST-NO-VECTORIZE: -ffast-math

0 commit comments

Comments
 (0)