blob: d659acc39d736aa6a65e223608fb144940037ea8 [file] [log] [blame]
Daniel Dunbar1ef29d22009-05-03 23:04:40 +00001// 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.
5// RUN: grep -e '^ ... ' %t.msg &&
6// RUN: grep -e '^ \^' %t.msg &&
7
8// RUN: true
9
10// Hack so we can check things better, force the file name and line.
11
12# 1 "FILE" 1
Douglas Gregorfffd93f2009-05-01 21:53:04 +000013
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. */
18void f(int, float, char, float);
19
20void g() {
21 int (*fp1)(int, float, short, float) = f;
22
23 int (*fp2)(int, float, short, float) = f;
24}
Douglas Gregor47f71772009-05-01 23:32:58 +000025
26void a_func_to_call(int, int, int);
27
28void 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 Dunbar1ef29d22009-05-03 23:04:40 +000034
35#pragma STDC CX_LIMITED_RANGE // some long comment text and a brace, eh {}