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:
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
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
_
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
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