================
@@ -664,6 +664,15 @@
 // RUN: not %clang_cl /guard:foo -### -- %s 2>&1 | FileCheck 
-check-prefix=CFGUARDINVALID %s
 // CFGUARDINVALID: invalid value 'foo' in '/guard:'
 
+// The test doesn't run in a PTY, so "auto" defaults to off.
+// RUN: %clang_cl -fdiagnostics-color=auto -### -- %s 2>&1 | FileCheck 
-check-prefix=NO_COLOR %s
+
+// RUN: %clang_cl -fdiagnostics-color -### -- %s 2>&1 | FileCheck 
-check-prefix=COLOR %s
+// RUN: %clang_cl -fdiagnostics-color=always -### -- %s 2>&1 | FileCheck 
-check-prefix=COLOR %s
+// RUN: %clang_cl -fdiagnostics-color=never -### -- %s 2>&1 | FileCheck 
-check-prefix=NO_COLOR %s
+// COLOR: "-fcolor-diagnostics"
----------------
Maetveis wrote:

I think you should instead add `-fcolor-diagnostics=auto` to the list below, no 
need to check the functionality again in clang-cl, it is already sufficiently 
tested IMO by 
[clang/test/Driver/color-diagnostics.c](https://github.com/llvm/llvm-project/blob/2405c5fb3ed49b928bb2816ace7b67c8979cd9d7/clang/test/Driver/color-diagnostics.c)

```diff
 // RUN:     -fno-coverage-mapping \
 // RUN:     -fdiagnostics-color \
+// RUN:     -fdiagnostics-color=auto \
 // RUN:     -fno-diagnostics-color \
 // RUN:     -fdebug-compilation-dir . \
 // RUN:     -fdebug-compilation-dir=. \
 // RUN:     -ffile-compilation-dir=. \
 ```

https://github.com/llvm/llvm-project/pull/120644
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to