[clang] [Clang-CL][DXC] Expose -fdiagnostic-color= to clang-cl and clang-dxc (PR #120644)
Mészáros Gergely via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 20 03:05:26 PST 2024
================
@@ -0,0 +1,8 @@
+// The test doesn't run in a PTY, so "auto" defaults to off.
----------------
Maetveis wrote:
Similarly here I think its enough to check that the option is accepted, no real need to verify what it does.
```c
// RUN: %clang_dxc \
// RUN: -fcolor-diagnostics \
// RUN: -fno-color-diagnostics \
// RUN: -fdiagnostics-color \
// RUN: -fno-diagnostics-color \
// RUN: -fdiagnostics-color=auto \
// RUN: -Tlib_6_7 -Vd -fdriver-only -- %s 2>&1 | count 0
```
(Might as well test all the other color flags while at it too).
(`-fdriver-only` and `count 0` should make sure we don't get any warnings not just errors).
Also NIT: Make sure to have a final newline in the file.
https://github.com/llvm/llvm-project/pull/120644
More information about the cfe-commits
mailing list