Skip to content

Commit c3095bd

Browse files
committed
Add diag group
1 parent 9b8f227 commit c3095bd

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

clang/include/clang/Basic/DiagnosticDriverKinds.td

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,8 @@ def warn_drv_large_data_threshold_invalid_code_model: Warning<
504504
InGroup<UnusedCommandLineArgument>;
505505
def warn_drv_math_errno_reenabled_after_veclib: Warning<
506506
"math errno re-enabled by '%0' after it was implicitly disabled by '%1',"
507-
" this may prevent vectorization with the specified vector library">;
507+
" this may prevent vectorization with the specified vector library">,
508+
InGroup<MathErrnoEnabledWithVecLib>;
508509

509510
def note_drv_command_failed_diag_msg : Note<
510511
"diagnostic msg: %0">;

clang/include/clang/Basic/DiagnosticGroups.td

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ def FloatZeroConversion : DiagGroup<"float-zero-conversion">;
125125
def FloatConversion :
126126
DiagGroup<"float-conversion", [FloatOverflowConversion,
127127
FloatZeroConversion]>;
128+
def MathErrnoEnabledWithVecLib : DiagGroup<"math-errno-enabled-with-veclib">;
128129

129130
def FrameAddress : DiagGroup<"frame-address">;
130131
def FreeNonHeapObject : DiagGroup<"free-nonheap-object">;

clang/test/Driver/fveclib.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,21 +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
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]
80+
8081
// CHECK-REENABLE-ERRNO-ARMPL: "-fveclib=ArmPL"
8182
// CHECK-REENABLE-ERRNO-ARMPL-SAME: "-fmath-errno"
8283

8384
// RUN: %clang -### --target=aarch64-linux-gnu -fveclib=SLEEF -fmath-errno %s 2>&1 | FileCheck --check-prefix=CHECK-REENABLE-ERRNO-SLEEF %s
84-
// 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
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]
86+
8587
// CHECK-REENABLE-ERRNO-SLEEF: "-fveclib=SLEEF"
8688
// CHECK-REENABLE-ERRNO-SLEEF-SAME: "-fmath-errno"
8789

8890
// RUN: %clang -### --target=aarch64-linux-gnu -fveclib=ArmPL -fno-fast-math %s 2>&1 | FileCheck --check-prefix=CHECK-REENABLE-ERRNO-NFM %s
89-
// 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
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]
92+
9093
// CHECK-REENABLE-ERRNO-NFM: "-fveclib=ArmPL"
9194
// CHECK-REENABLE-ERRNO-NFM-SAME: "-fmath-errno"
9295

9396
// RUN: %clang -### --target=aarch64-linux-gnu -fveclib=ArmPL -ffp-model=strict %s 2>&1 | FileCheck --check-prefix=CHECK-REENABLE-ERRNO-FP-MODEL %s
94-
// 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
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]
98+
9599
// CHECK-REENABLE-ERRNO-FP-MODEL: "-fveclib=ArmPL"
96100
// CHECK-REENABLE-ERRNO-FP-MODEL-SAME: "-fmath-errno"

0 commit comments

Comments
 (0)