Use ANSI escape codes for --use-color on Windows
authorDavid Sanders <dsanders11@ucsbalum.com>
Sat, 31 Oct 2020 14:36:42 +0000 (10:36 -0400)
committerAaron Ballman <aaron@aaronballman.com>
Sat, 31 Oct 2020 14:36:42 +0000 (10:36 -0400)
commitd915d403d7410b17e8ac52f1f435859713a7b354
tree6edd3c8f1d2abdcb97c88df5d1c42391977d169c
parent30ad7426442e6f029419366de8fe56eae529c00c
Use ANSI escape codes for --use-color on Windows

On Windows the --use-color option cannot be used for its originally
intended purpose of forcing color when piping stdout, since Windows
does not use ANSI escape codes by default. This change turns on ANSI
escape codes on Windows when forcing color to a non-displayed stdout
(e.g. piped).
clang-tools-extra/clang-tidy/ClangTidy.cpp
clang-tools-extra/test/clang-tidy/infrastructure/use-color.cpp