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:
<<inline: PastedGraphic-1.png>>
On Mar 23, 2012, at 4:42 PM, Eli Friedman wrote: > On Fri, Mar 23, 2012 at 1:49 AM, Eli Friedman <[email protected]> wrote: >> On Thu, Mar 22, 2012 at 11:57 PM, Seth Cantrell <[email protected]> >> 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>
hacked-up-patch-with-column-adjustments.patch
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
