[cfe-dev] Print diagnostics with color from API

Alejandro Jimenez whilealex at gmail.com
Tue Jan 7 12:50:06 PST 2014


Hi
I am trying to print an error message from clang API with colored format,

>From StringRef message filled with diagnostics data I try

clang::TextDiagnostic::printDiagnosticMessage(outs(),
clang::DiagnosticsEngine::Level::Error, message, 0, console->width, true);

But I dont see any colors on the screen buffer, I have look around, but
could not find examples of this task, does anybody know how to print
colored errors and warnings given only the StringRef buffer?

Thanks

Alejandro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140107/d7389ddd/attachment.html>


More information about the cfe-dev mailing list