6749dd50869281f9b49ad5960e25288c15a71cac |
|
18-Apr-2012 |
Seth Cantrell <seth.cantrell@gmail.com> |
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@154980 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Misc/message-length.c
|
9591697707c69af99bb196d70895f4e7e28be333 |
|
17-Apr-2012 |
Seth Cantrell <seth.cantrell@gmail.com> |
Revert "Nicer display of unprintable source, and fix caret display for non-ascii text" This reverts commit e9a3b76ba589a8a884e978273beaed0d97cf9861. Revert "fix display of source lines with null characters" This reverts commit 70712b276e40bbe11e5063dfc7e82ce3209929cd. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154950 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Misc/message-length.c
|
e9a3b76ba589a8a884e978273beaed0d97cf9861 |
|
17-Apr-2012 |
Seth Cantrell <seth.cantrell@gmail.com> |
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
/external/clang/test/Misc/message-length.c
|
ce487ef6c1ba3b35250ce5bfe053e24e34a854e6 |
|
16-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix a bug in caret-line-pruning logic that only happens when we have a source line wider than the terminal where the associated fix-it line is longer than the caret line. Previously, we would crash in this case, which was rather unfortunate. Fixes <rdar://problem/7856226>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101426 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Misc/message-length.c
|
a5728872c7702ddd09537c95bc3cbd20e1f2fb09 |
|
15-Dec-2009 |
Daniel Dunbar <daniel@zuster.org> |
Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Misc/message-length.c
|
2b48ed7e172e2a2a6535a0bc89cf40f6de9ec2ef |
|
08-Dec-2009 |
Daniel Dunbar <daniel@zuster.org> |
Switch this test to use clang-cc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Misc/message-length.c
|
4fcfde4d5c8f25e40720972a5543d538a0dcb220 |
|
08-Nov-2009 |
Daniel Dunbar <daniel@zuster.org> |
Eliminate &&s in tests. - 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86430 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Misc/message-length.c
|
b3baceffe2bc9907a2d0ab2e72068339402a375b |
|
25-Oct-2009 |
Daniel Dunbar <daniel@zuster.org> |
Tweak test, with -strict-whitespace $ won't match on Windows because the buffer will have \r\n. - Perhaps we should make FileCheck normalize line-endings, even in strict-whitespace mode? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85066 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Misc/message-length.c
|
06d10728b86ebb2bd73b593146e95e0c1688acc4 |
|
19-Oct-2009 |
Daniel Dunbar <daniel@zuster.org> |
Workaround a bug exposed by the FileCheckify of message-length.c, the caret end column computation isn't correct and could exceed the line length, which resulted in a buffer overflow later. - Chris, is there a better way for this code to compute the final column used by the caret? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Misc/message-length.c
|
acfd65d0db825dbc9d4912abca6c84b3192820cd |
|
19-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
convert this to FileCheck, PR5232 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84466 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Misc/message-length.c
|
c95bd4de800dfc643f0dab0122757f9ca9723fe9 |
|
15-May-2009 |
Douglas Gregor <dgregor@apple.com> |
When word-wrapping, be more defensive about a ridiculously small number of columns. Fixes <rdar://problem/6892178> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71870 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Misc/message-length.c
|
dcef78d007f802c0e4136fe041b8c1687f219c48 |
|
04-May-2009 |
Daniel Dunbar <daniel@zuster.org> |
Update test case... the location given for this error makes it look rather odd when truncated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70866 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Misc/message-length.c
|
1ef29d217ef9084bca57fe31e0d1541efa6d120a |
|
04-May-2009 |
Daniel Dunbar <daniel@zuster.org> |
Fix an infinite loop in diagnostic printing. - The diagnostic is still poor, however. Doug, can you investigate? - Improved the test case to not depend on the file name, now it can be extended to actually check the formatting of the diagnostics (I'm hoping grep -A is portable here). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70807 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Misc/message-length.c
|
47f717788082cdc38b899faf18acc8d1cda1b9c5 |
|
02-May-2009 |
Douglas Gregor <dgregor@apple.com> |
When printing a source line as part of a diagnostic, the source line might be wider than we're supposed to print. In this case, we try to select the "important" subregion of the source line, which contains everything that we want to show (e.g., with underlining and the caret itself) and tries to also contain some of the context. From the fantastically long line in the test case, we get an error message that slices down to this: message-length.c:18:120: warning: comparison of distinct pointer types ('int *' and 'float *') a_func_to_call(ip == FloatPointer, ip[ALongIndexName], ~~ ^ ~~~~~~~~~~~~ There are a bunch of gee-it-sounds-good heuristics in here, which seem to do well on the various simple tests I've thrown at it. However, we're going to need to look at a bunch more diagnostics to tweak these heuristics. This is the second part of <rdar://problem/6711348>. Almost there! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Misc/message-length.c
|
fffd93f38340d4d2ca7ee78a8c91c890b2ff3fa0 |
|
01-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement -fmessage-length=N, which word-wraps diagnostics to N columns. Also, put a line of whitespace between the diagnostic and the source code/caret line when the start of the actual source code text lines up (or nearly lines up) with the most recent line of the diagnostic. For example, here it's okay for the last line of the diagnostic to be (vertically) next to the source line, because there is horizontal whitespace to separate them: decl-expr-ambiguity.cpp:12:16: error: function-style cast to a builtin type can only take one argument typeof(int)(a,5)<<a; However, here is a case where we need the vertical separation (since there is no horizontal separation): message-length.c:10:46: warning: incompatible pointer types initializing 'void (int, float, char, float)', expected 'int (*)(int, float, short, float)' int (*fp1)(int, float, short, float) = f; This is part one of <rdar://problem/6711348>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70578 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Misc/message-length.c
|