[PATCH] D44215: [Support] Move syntax highlighting into support

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 7 10:02:01 PST 2018


dblaikie added inline comments.


================
Comment at: llvm/lib/Support/SyntaxHighlighting.cpp:32
     switch (Type) {
-    case Address:    OS.changeColor(raw_ostream::YELLOW);         break;
-    case String:     OS.changeColor(raw_ostream::GREEN);          break;
-    case Tag:        OS.changeColor(raw_ostream::BLUE);           break;
-    case Attribute:  OS.changeColor(raw_ostream::CYAN);           break;
-    case Enumerator: OS.changeColor(raw_ostream::MAGENTA);        break;
-    case Macro:      OS.changeColor(raw_ostream::RED);            break;
-    case Error:      OS.changeColor(raw_ostream::RED, true);      break;
-    case Warning:    OS.changeColor(raw_ostream::MAGENTA, true);  break;
-    case Note:       OS.changeColor(raw_ostream::BLACK, true);    break;
+    case Address:
+      OS.changeColor(raw_ostream::YELLOW);
----------------
davide wrote:
> these formatting changes are unrelated I assume? If so, can you split?
Any interest in fixing this enum (Address/String/Tag/Attribute) to either have a prefix (HC_) or use an enum class (HighlightColor::Address, etc) in a follow-up change?

I think I wrote some code the other day where I thought I was using a variable named "Address" (wihch I'd forgotten to actually declare/initialize) but was actually using this enum constant... 


Repository:
  rL LLVM

https://reviews.llvm.org/D44215





More information about the llvm-commits mailing list