Skip to content

Commit 7756201

Browse files
committed
Address PR comments
1 parent 2d6d43a commit 7756201

File tree

3 files changed

+11
-16
lines changed

3 files changed

+11
-16
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,9 @@ New Compiler Flags
445445
- The ``-Warray-compare-cxx26`` warning has been added to warn about array comparison
446446
starting from C++26, this warning is enabled as an error by default.
447447

448+
- clang-cl and clang-dxc now support ``-fdiagnostics-color=[auto|never|always]``
449+
in addition to ``-f[no-]color-diagnostics``.
450+
448451
Deprecated Compiler Flags
449452
-------------------------
450453

clang/test/Driver/cl-options.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -664,15 +664,6 @@
664664
// RUN: not %clang_cl /guard:foo -### -- %s 2>&1 | FileCheck -check-prefix=CFGUARDINVALID %s
665665
// CFGUARDINVALID: invalid value 'foo' in '/guard:'
666666

667-
// The test doesn't run in a PTY, so "auto" defaults to off.
668-
// RUN: %clang_cl -fdiagnostics-color=auto -### -- %s 2>&1 | FileCheck -check-prefix=NO_COLOR %s
669-
670-
// RUN: %clang_cl -fdiagnostics-color -### -- %s 2>&1 | FileCheck -check-prefix=COLOR %s
671-
// RUN: %clang_cl -fdiagnostics-color=always -### -- %s 2>&1 | FileCheck -check-prefix=COLOR %s
672-
// RUN: %clang_cl -fdiagnostics-color=never -### -- %s 2>&1 | FileCheck -check-prefix=NO_COLOR %s
673-
// COLOR: "-fcolor-diagnostics"
674-
// NO_COLOR-NOT: "-fcolor-diagnostics"
675-
676667
// Accept "core" clang options.
677668
// (/Zs is for syntax-only, -Werror makes it fail hard on unknown options)
678669
// RUN: %clang_cl \
@@ -689,6 +680,7 @@
689680
// RUN: -fcoverage-mapping \
690681
// RUN: -fno-coverage-mapping \
691682
// RUN: -fdiagnostics-color \
683+
// RUN: -fdiagnostics-color=auto \
692684
// RUN: -fno-diagnostics-color \
693685
// RUN: -fdebug-compilation-dir . \
694686
// RUN: -fdebug-compilation-dir=. \

clang/test/Driver/dxc_options.hlsl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// The test doesn't run in a PTY, so "auto" defaults to off.
2-
// RUN: %clang_dxc -Tlib_6_7 -fdiagnostics-color=auto -### -- %s 2>&1 | FileCheck -check-prefix=NO_COLOR %s
1+
// RUN: %clang_dxc \
2+
// RUN: -fcolor-diagnostics \
3+
// RUN: -fno-color-diagnostics \
4+
// RUN: -fdiagnostics-color \
5+
// RUN: -fno-diagnostics-color \
6+
// RUN: -fdiagnostics-color=auto \
7+
// RUN: -Tlib_6_7 -Vd -fdriver-only -- %s 2>&1 |count 0
38

4-
// RUN: %clang_dxc -Tlib_6_7 -fdiagnostics-color -### %s 2>&1 | FileCheck -check-prefix=COLOR %s
5-
// RUN: %clang_dxc -Tlib_6_7 -fdiagnostics-color=always -### %s 2>&1 | FileCheck -check-prefix=COLOR %s
6-
// RUN: %clang_dxc -Tlib_6_7 -fdiagnostics-color=never -### %s 2>&1 | FileCheck -check-prefix=NO_COLOR %s
7-
// COLOR: "-fcolor-diagnostics"
8-
// NO_COLOR-NOT: "-fcolor-diagnostics"

0 commit comments

Comments
 (0)