================
@@ -53,7 +53,7 @@ void clang::ProcessWarningOptions(DiagnosticsEngine &Diags,
 
   Diags.setElideType(Opts.ElideType);
   Diags.setPrintTemplateTree(Opts.ShowTemplateTree);
-  Diags.setShowColors(Opts.ShowColors);
+  Diags.setShowColors(Opts.showColors(/*StreamHasColors=*/true));
----------------
AaronBallman wrote:

I think this change is correct, but maybe we should have test coverage for:

Using `-diagnostic-log-file` to specify a regular file, no options about color
Using `-diagnostic-log-file` to specify a regular file, enable color
Using `-diagnostic-log-file` to specify a terminal, no options about color

so that we can validate that option handling behaves correctly here. WDYT?

https://github.com/llvm/llvm-project/pull/202441
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to