Here are some patches for review. One enables setting reverse colors with 
raw_ostreams in LLVM. The other is to print unprintable characters in clang 
diagnostics in hex with reversed colors.

On Jan 22, 2012, at 8:14 PM, Eli Friedman wrote:

> On Sun, Jan 22, 2012 at 6:13 AM, Seth Cantrell <[email protected]> 
> wrote:
>> 
>> Okay, this isn't a patch, I just want to know if this is the direction 
>> you're looking for. The included changes will result in an error message 
>> like:
>> 
>> tmp.cpp:3:10: error: illegal sequence in character literal
>> char a = '<f1>';
>>          ^
>> 
>> It doesn't do anything to try to make the highlighted ranges look correct 
>> for the modified source line. This will cause a problem similar to the one 
>> that already exists with multi-byte UTF-8 encodings, where carets and ranges 
>> do not appear correct after these sequences.
> 
> It's sort of related, but this should only affect the way the caret is
> printed; this substitution shouldn't affect the actual computed column
> numbers (which I think are supposed to be in raw code units).
> 
>> Also, I think it would be better if these <XX> strings could be displayed 
>> with a reversed color scheme, just like vi, if the console supports it. Is 
>> there any possibility of doing that?
> 
> Sure, I don't see why not; we already use colors for diagnostics.
> 
>> Anyway, here are the changes I am contemplating:
> 
> [...]
> 
> Yes, that's the sort of thing I was thinking of.  Might as well catch
> unprintable control characters as well while you're here.
> 
> -Eli

Attachment: 0001-Add-reverseColor-to-raw_ostream.patch
Description: Binary data

Attachment: 0001-print-unprintable-characters-with-Hex-codes-and-with.patch
Description: Binary data

Attachment: unprintable_diagnostics.cpp
Description: Binary data

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to