[cfe-dev] Print diagnostics with color from API

Richard Trieu rtrieu at google.com
Tue Jan 7 13:40:32 PST 2014


What colors were you expecting?  There is very little color formatting
within the diagnostic message itself.  From the code, it will bold text
when the level is Error, Fatal, or Warning, but not for Note.  After that,
there is color for the template diffing, but besides that I don't believe
there is any other color.


On Tue, Jan 7, 2014 at 12:50 PM, Alejandro Jimenez <whilealex at gmail.com>wrote:

> 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
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140107/83fcbf5c/attachment.html>


More information about the cfe-dev mailing list