[PATCH] D67060: [Support] Support restoring colors in WithColor
    Fangrui Song via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Sep  9 08:21:43 PDT 2019
    
    
  
MaskRay added a comment.
The new approach looks good.
================
Comment at: llvm/include/llvm/Support/raw_ostream.h:94
+
+    ColorState(Colors Color, bool Bold, bool BG)
+        : Color(Color), Bold(Bold), BG(BG) {}
----------------
The struct will be an aggregate if you delete the constructor. It can still be brace initialized.
================
Comment at: llvm/include/llvm/Support/raw_ostream.h:432
 
+  void saveColor(enum Colors Color, bool Bold, bool BG) {
+    CurrentColor = {Color, Bold, BG};
----------------
Delete `enum`
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67060/new/
https://reviews.llvm.org/D67060
    
    
More information about the llvm-commits
mailing list