[PATCH] D65854: [diagtool] Use `operator<<(Colors)` to print out colored output.

2019-08-08 Thread Rui Ueyama via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL368259: [diagtool] Use `operator<<(Colors)` to print out colored output. (authored by ruiu, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D65854: [diagtool] Use `operator<<(Colors)` to print out colored output.

2019-08-07 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu marked an inline comment as done. ruiu added inline comments. Comment at: clang/tools/diagtool/TreeView.cpp:167 + if (!hasColors(out)) +out.enable_colors(false); + MaskRay wrote: > `out.enable_colors(out.has_colors());` > > It looks the function `hasCo

[PATCH] D65854: [diagtool] Use `operator<<(Colors)` to print out colored output.

2019-08-07 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere accepted this revision. JDevlieghere added a comment. This revision is now accepted and ready to land. LGTM with Fangrui's comment addressed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65854/new/ https://reviews.llvm.org/D65854 _

[PATCH] D65854: [diagtool] Use `operator<<(Colors)` to print out colored output.

2019-08-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/tools/diagtool/TreeView.cpp:167 + if (!hasColors(out)) +out.enable_colors(false); + `out.enable_colors(out.has_colors());` It looks the function `hasColors` is overengineered. `out` in these files can only b

[PATCH] D65854: [diagtool] Use `operator<<(Colors)` to print out colored output.

2019-08-07 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu created this revision. ruiu added a reviewer: JDevlieghere. Herald added a project: clang. Herald added a subscriber: cfe-commits. r368131 introduced this new API to print out messages in colors. If the colored output is disabled, `operator<<(Colors)` becomes nop. No functionality change inte