Skip to content

Commit a47592b

Browse files
committed
Fixup warning
1 parent 9da17e8 commit a47592b

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

clang/include/clang/Basic/DiagnosticDriverKinds.td

+3-3
Original file line numberDiff line numberDiff line change
@@ -502,9 +502,9 @@ def err_sls_hardening_arm_not_supported : Error<
502502
def warn_drv_large_data_threshold_invalid_code_model: Warning<
503503
"'%0' only applies to medium and large code models">,
504504
InGroup<UnusedCommandLineArgument>;
505-
def warn_drv_math_errno_reenabled_after_veclib: Warning<
506-
"math errno re-enabled by '%0' after it was implicitly disabled by '%1',"
507-
" this may prevent vectorization with the specified vector library">,
505+
def warn_drv_math_errno_enabled_after_veclib: Warning<
506+
"math errno enabled by '%0' after it was implicitly disabled by '%1',"
507+
" this may limit the utilization of the vector library">,
508508
InGroup<MathErrnoEnabledWithVecLib>;
509509

510510
def note_drv_command_failed_diag_msg : Note<

clang/lib/Driver/ToolChains/Clang.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -2860,8 +2860,8 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D,
28602860
llvm::StringLiteral("SLEEF")};
28612861
bool NoMathErrnoWasImpliedByVecLib = false;
28622862
const Arg *VecLibArg = nullptr;
2863-
// Track the arg (if any) that reenabled errno after -fveclib for diagnostics.
2864-
const Arg *ArgThatReenabledMathErrnoAfterVecLib = nullptr;
2863+
// Track the arg (if any) that enabled errno after -fveclib for diagnostics.
2864+
const Arg *ArgThatEnabledMathErrnoAfterVecLib = nullptr;
28652865

28662866
// Handle various floating point optimization flags, mapping them to the
28672867
// appropriate LLVM code generation flags. This is complicated by several
@@ -2972,7 +2972,7 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D,
29722972
auto CheckMathErrnoForVecLib =
29732973
llvm::make_scope_exit([&, MathErrnoBeforeArg = MathErrno] {
29742974
if (NoMathErrnoWasImpliedByVecLib && !MathErrnoBeforeArg && MathErrno)
2975-
ArgThatReenabledMathErrnoAfterVecLib = A;
2975+
ArgThatEnabledMathErrnoAfterVecLib = A;
29762976
});
29772977

29782978
switch (A->getOption().getID()) {
@@ -3363,8 +3363,8 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D,
33633363
if (MathErrno) {
33643364
CmdArgs.push_back("-fmath-errno");
33653365
if (NoMathErrnoWasImpliedByVecLib)
3366-
D.Diag(clang::diag::warn_drv_math_errno_reenabled_after_veclib)
3367-
<< ArgThatReenabledMathErrnoAfterVecLib->getAsString(Args)
3366+
D.Diag(clang::diag::warn_drv_math_errno_enabled_after_veclib)
3367+
<< ArgThatEnabledMathErrnoAfterVecLib->getAsString(Args)
33683368
<< VecLibArg->getAsString(Args);
33693369
}
33703370

clang/test/Driver/fveclib.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -76,25 +76,25 @@
7676
// CHECK-ERRNO-ARMPL-NOT: "-fmath-errno"
7777

7878
// RUN: %clang -### --target=aarch64-linux-gnu -fveclib=ArmPL -fmath-errno %s 2>&1 | FileCheck --check-prefix=CHECK-REENABLE-ERRNO-ARMPL %s
79-
// CHECK-REENABLE-ERRNO-ARMPL: math errno re-enabled by '-fmath-errno' after it was implicitly disabled by '-fveclib=ArmPL', this may prevent vectorization with the specified vector library [-Wmath-errno-enabled-with-veclib]
79+
// CHECK-REENABLE-ERRNO-ARMPL: math errno enabled by '-fmath-errno' after it was implicitly disabled by '-fveclib=ArmPL', this may limit the utilization of the vector library [-Wmath-errno-enabled-with-veclib]
8080

8181
// CHECK-REENABLE-ERRNO-ARMPL: "-fveclib=ArmPL"
8282
// CHECK-REENABLE-ERRNO-ARMPL-SAME: "-fmath-errno"
8383

8484
// RUN: %clang -### --target=aarch64-linux-gnu -fveclib=SLEEF -fmath-errno %s 2>&1 | FileCheck --check-prefix=CHECK-REENABLE-ERRNO-SLEEF %s
85-
// CHECK-REENABLE-ERRNO-SLEEF: math errno re-enabled by '-fmath-errno' after it was implicitly disabled by '-fveclib=SLEEF', this may prevent vectorization with the specified vector library [-Wmath-errno-enabled-with-veclib]
85+
// CHECK-REENABLE-ERRNO-SLEEF: math errno enabled by '-fmath-errno' after it was implicitly disabled by '-fveclib=SLEEF', this may limit the utilization of the vector library [-Wmath-errno-enabled-with-veclib]
8686

8787
// CHECK-REENABLE-ERRNO-SLEEF: "-fveclib=SLEEF"
8888
// CHECK-REENABLE-ERRNO-SLEEF-SAME: "-fmath-errno"
8989

9090
// RUN: %clang -### --target=aarch64-linux-gnu -fveclib=ArmPL -fno-fast-math %s 2>&1 | FileCheck --check-prefix=CHECK-REENABLE-ERRNO-NFM %s
91-
// CHECK-REENABLE-ERRNO-NFM: math errno re-enabled by '-fno-fast-math' after it was implicitly disabled by '-fveclib=ArmPL', this may prevent vectorization with the specified vector library [-Wmath-errno-enabled-with-veclib]
91+
// CHECK-REENABLE-ERRNO-NFM: math errno enabled by '-fno-fast-math' after it was implicitly disabled by '-fveclib=ArmPL', this may limit the utilization of the vector library [-Wmath-errno-enabled-with-veclib]
9292

9393
// CHECK-REENABLE-ERRNO-NFM: "-fveclib=ArmPL"
9494
// CHECK-REENABLE-ERRNO-NFM-SAME: "-fmath-errno"
9595

9696
// RUN: %clang -### --target=aarch64-linux-gnu -fveclib=ArmPL -ffp-model=strict %s 2>&1 | FileCheck --check-prefix=CHECK-REENABLE-ERRNO-FP-MODEL %s
97-
// CHECK-REENABLE-ERRNO-FP-MODEL: math errno re-enabled by '-ffp-model=strict' after it was implicitly disabled by '-fveclib=ArmPL', this may prevent vectorization with the specified vector library [-Wmath-errno-enabled-with-veclib]
97+
// CHECK-REENABLE-ERRNO-FP-MODEL: math errno enabled by '-ffp-model=strict' after it was implicitly disabled by '-fveclib=ArmPL', this may limit the utilization of the vector library [-Wmath-errno-enabled-with-veclib]
9898

9999
// CHECK-REENABLE-ERRNO-FP-MODEL: "-fveclib=ArmPL"
100100
// CHECK-REENABLE-ERRNO-FP-MODEL-SAME: "-fmath-errno"

0 commit comments

Comments
 (0)