]> granicus.if.org Git - clang/commit
Nicer display of unprintable source, and fix caret display for non-ascii text
authorSeth Cantrell <seth.cantrell@gmail.com>
Tue, 17 Apr 2012 20:06:03 +0000 (20:06 +0000)
committerSeth Cantrell <seth.cantrell@gmail.com>
Tue, 17 Apr 2012 20:06:03 +0000 (20:06 +0000)
commite9a3b76ba589a8a884e978273beaed0d97cf9861
tree8f799617cda9007a9fd144549cff86f5cb769445
parent54881cb78e2c9054188c002c012b72175429e79b
Nicer display of unprintable source, and fix caret display for non-ascii text

Unprintable source in diagnostics is transformed to a printable form and then
displayed with reversed colors if possible. Unprintable characters are
displayed as <U+NNNN> while bytes that do not represent valid characters are
shown as <XX>.

Column adjustments to diagnostic carets, highlighted ranges, and fixups are
made both for characters escaped as above and for characters which are
printable but take up more than a single column.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154946 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/ConvertUTF.h
include/clang/Frontend/TextDiagnostic.h
lib/Frontend/TextDiagnostic.cpp
test/Misc/message-length.c
test/Misc/unprintable.c [new file with mode: 0644]
test/Misc/wrong-encoding.c [new file with mode: 0644]