Daniel Dunbar | 1ef29d2 | 2009-05-03 23:04:40 +0000 | [diff] [blame] | 1 | // RUN: clang -fsyntax-only -fmessage-length=72 %s 2> %t && |
| 2 | |
| 3 | // RUN: grep -A4 "FILE:23" %t > %t.msg && |
| 4 | // FIXME: This diagnostic is getting truncated very poorly. |
Daniel Dunbar | dcef78d | 2009-05-04 15:18:44 +0000 | [diff] [blame] | 5 | // RUN: grep -e '^ ...// some long comment text and a brace, eh {} ' %t.msg && |
| 6 | // RUN: grep -e '^ \^' %t.msg && |
Douglas Gregor | c95bd4d | 2009-05-15 18:05:24 +0000 | [diff] [blame] | 7 | // RUN: clang -fsyntax-only -fmessage-length=1 %s && |
Daniel Dunbar | 1ef29d2 | 2009-05-03 23:04:40 +0000 | [diff] [blame] | 8 | // RUN: true |
| 9 | |
| 10 | // Hack so we can check things better, force the file name and line. |
| 11 | |
| 12 | # 1 "FILE" 1 |
Douglas Gregor | fffd93f | 2009-05-01 21:53:04 +0000 | [diff] [blame] | 13 | |
| 14 | /* It's tough to verify the results of this test mechanically, since |
| 15 | the length of the filename (and, therefore, how the word-wrapping |
| 16 | behaves) changes depending on where the test-suite resides in the |
| 17 | file system. */ |
| 18 | void f(int, float, char, float); |
| 19 | |
| 20 | void g() { |
| 21 | int (*fp1)(int, float, short, float) = f; |
| 22 | |
| 23 | int (*fp2)(int, float, short, float) = f; |
| 24 | } |
Douglas Gregor | 47f7177 | 2009-05-01 23:32:58 +0000 | [diff] [blame] | 25 | |
| 26 | void a_func_to_call(int, int, int); |
| 27 | |
| 28 | void a_very_long_line(int *ip, float *FloatPointer) { |
| 29 | for (int ALongIndexName = 0; ALongIndexName < 100; ALongIndexName++) if (ip[ALongIndexName] == 17) a_func_to_call(ip == FloatPointer, ip[ALongIndexName], FloatPointer[ALongIndexName]); |
| 30 | |
| 31 | |
| 32 | int array0[] = { [3] 3, 5, 7, 4, 2, 7, 6, 3, 4, 5, 6, 7, 8, 9, 12, 345, 14, 345, 789, 234, 678, 345, 123, 765, 234 }; |
| 33 | } |
Daniel Dunbar | 1ef29d2 | 2009-05-03 23:04:40 +0000 | [diff] [blame] | 34 | |
| 35 | #pragma STDC CX_LIMITED_RANGE // some long comment text and a brace, eh {} |