[sanitizer] Make LSan/MSan/TSan honor the "color" flag.

Based on a patch by Stephan Bergmann.

llvm-svn: 210199
This commit is contained in:
Sergey Matveev 2014-06-04 16:57:03 +00:00
parent 06fa05ae90
commit dcd9bba602
3 changed files with 6 additions and 6 deletions

View File

@ -131,9 +131,9 @@ void InitCommonLsan() {
}
}
class Decorator: private __sanitizer::AnsiColorDecorator {
class Decorator: public __sanitizer::SanitizerCommonDecorator {
public:
Decorator() : __sanitizer::AnsiColorDecorator(PrintsToTtyCached()) { }
Decorator() : SanitizerCommonDecorator() { }
const char *Error() { return Red(); }
const char *Leak() { return Blue(); }
const char *End() { return Default(); }

View File

@ -27,9 +27,9 @@ using namespace __sanitizer;
namespace __msan {
class Decorator: private __sanitizer::AnsiColorDecorator {
class Decorator: public __sanitizer::SanitizerCommonDecorator {
public:
Decorator() : __sanitizer::AnsiColorDecorator(PrintsToTtyCached()) { }
Decorator() : SanitizerCommonDecorator() { }
const char *Warning() { return Red(); }
const char *Origin() { return Magenta(); }
const char *Name() { return Green(); }

View File

@ -17,9 +17,9 @@
namespace __tsan {
class Decorator: private __sanitizer::AnsiColorDecorator {
class Decorator: public __sanitizer::SanitizerCommonDecorator {
public:
Decorator() : __sanitizer::AnsiColorDecorator(PrintsToTtyCached()) { }
Decorator() : SanitizerCommonDecorator() { }
const char *Warning() { return Red(); }
const char *EndWarning() { return Default(); }
const char *Access() { return Blue(); }