]> granicus.if.org Git - clang/commitdiff
Re-submit r367649: Improve raw_ostream so that you can "write" colors using operator<<
authorRui Ueyama <ruiu@google.com>
Wed, 7 Aug 2019 08:08:17 +0000 (08:08 +0000)
committerRui Ueyama <ruiu@google.com>
Wed, 7 Aug 2019 08:08:17 +0000 (08:08 +0000)
The original patch broke buildbots, perhaps because it changed the
default setting whether colors are enabled or not.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@368131 91177308-0d34-0410-b5e6-96231b3b80d8

tools/diagtool/TreeView.cpp

index 154c52a485afb8b4350a390bbe36ec9d76a4bace..5160afc64ab2d71a9315003f87abf2b18a0534fb 100644 (file)
@@ -37,7 +37,8 @@ public:
 
   void setColor(llvm::raw_ostream::Colors Color) {
     if (ShowColors)
-      out << llvm::sys::Process::OutputColor(Color, false, false);
+      out << llvm::sys::Process::OutputColor(static_cast<char>(Color), false,
+                                             false);
   }
 
   void resetColor() {