[PATCH] D63179: [sanitizer-common] Reduce ANSI color sequences that have no effect.

Aaron Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 30 15:54:48 PDT 2019


aarongreen added inline comments.


================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_report_decorator.cc:22
+SanitizerCommonDecorator::ToKind(const char *s) {
+  if (internal_strncmp(s, "\033[", 2) != 0 || s[2] == '\0' || s[3] != 'm')
+    return kUnknown;
----------------
phosek wrote:
> Why not `internal_strncmp(s, "\033[0", 3) != 0`?
There's a difference between '0' and '\0'.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63179/new/

https://reviews.llvm.org/D63179





More information about the llvm-commits mailing list