[cfe-commits] r148389 - in /cfe/trunk: include/clang/Basic/DiagnosticLexKinds.td lib/Lex/LiteralSupport.cpp

Seth Cantrell seth.cantrell at gmail.com
Sat Mar 24 17:21:36 PDT 2012


Okay, here's a different approach. I'm trying to treat the column numbers as being a code unit offset and using that to calculate the real column numbers. It relies on being able to compute the column width of characters, and this hacked up version uses wcswidth to do that even though that's not really going to work (since it's locale based an also because wcswidth seems to be broken). Anyway, here are what the results look like for me in Terminal:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PastedGraphic-1.png
Type: image/png
Size: 14778 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120324/1b650f5e/attachment.png>
-------------- next part --------------

On Mar 23, 2012, at 4:42 PM, Eli Friedman wrote:

> On Fri, Mar 23, 2012 at 1:49 AM, Eli Friedman <eli.friedman at gmail.com> wrote:
>> On Thu, Mar 22, 2012 at 11:57 PM, Seth Cantrell <seth.cantrell at gmail.com> wrote:
>>> 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.
>> 
>> The patch for color reversal seems fine, although maybe someone more
>> familiar with that code should take a look.  The patch for unprintable
>> characters is a step in the right direction, but completely ignores
>> the caret/ranges and fixits (so things won't line up).
>> 
>> I was actually hacking on this code from that angle recently; I'll
>> send you what I have soon.
> 
> Attaching my work-in-progress, which lines up the caret correctly (but
> doesn't have your nice color-formatting, and there are still a couple
> other issues with making everything line up).
> 
> -Eli
> <diagencoding.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hacked-up-patch-with-column-adjustments.patch
Type: application/octet-stream
Size: 9124 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120324/1b650f5e/attachment.obj>


More information about the cfe-commits mailing list