[PATCH] D97398: add print-changed mode that does not use colour

Jamie Schmeiser via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 24 11:21:08 PST 2021


jamieschmeiser added a comment.

I don't think we want auto-detection because the user needs to be able to control it.  If it is just going to the screen, the colour is useful, but if the output is being captured and brought up in emacs/vim/etc, the colour characters just show as control characters.  less on LINUX doesn't handle the colour characters; other utilities may also have problems with them.



================
Comment at: llvm/test/Other/ChangePrinters/print-changed-diff.ll:65
 
+; Simple checks of -print-changed=cdiff
+;
----------------
aeubanks wrote:
> I would have expected to see some diffs in the existing CHECK lines since they were previously emitting color directives, but now aren't
> 
> Am I missing something?
The existing tests didn't need to be changed because they only looked for +/- and didn't check for the colour characters.  In adding the new tests, I copied the existing ones and added in a regex that checks for (most of) the colour control characters.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97398/new/

https://reviews.llvm.org/D97398



More information about the llvm-commits mailing list