| Douglas Gregor | ce487ef | 2010-04-16 00:23:51 +0000 | [diff] [blame] | 1 | // RUN: not %clang_cc1 -fmessage-length 72 %s 2>&1 | FileCheck -strict-whitespace %s | 
 | 2 | // RUN: not %clang_cc1 -fmessage-length 1 %s | 
 | 3 | // RUN: not %clang_cc1 -fmessage-length 8 %s 2>&1 | FileCheck -check-prefix=CHECK-DOT %s | 
| Daniel Dunbar | 1ef29d2 | 2009-05-03 23:04:40 +0000 | [diff] [blame] | 4 | // Hack so we can check things better, force the file name and line. | 
| Daniel Dunbar | 1ef29d2 | 2009-05-03 23:04:40 +0000 | [diff] [blame] | 5 | # 1 "FILE" 1 | 
| Douglas Gregor | fffd93f | 2009-05-01 21:53:04 +0000 | [diff] [blame] | 6 |  | 
 | 7 | /* It's tough to verify the results of this test mechanically, since | 
 | 8 |    the length of the filename (and, therefore, how the word-wrapping | 
 | 9 |    behaves) changes depending on where the test-suite resides in the | 
 | 10 |    file system. */ | 
 | 11 | void f(int, float, char, float); | 
 | 12 |  | 
 | 13 | void g() { | 
 | 14 |       int (*fp1)(int, float, short, float) = f; | 
 | 15 |  | 
 | 16 |   int (*fp2)(int, float, short, float) = f; | 
 | 17 | } | 
| Douglas Gregor | 47f7177 | 2009-05-01 23:32:58 +0000 | [diff] [blame] | 18 |  | 
 | 19 | void a_func_to_call(int, int, int); | 
 | 20 |  | 
 | 21 | void a_very_long_line(int *ip, float *FloatPointer) { | 
 | 22 |   for (int ALongIndexName = 0; ALongIndexName < 100; ALongIndexName++) if (ip[ALongIndexName] == 17) a_func_to_call(ip == FloatPointer, ip[ALongIndexName], FloatPointer[ALongIndexName]); | 
 | 23 |  | 
 | 24 |  | 
 | 25 |   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 }; | 
 | 26 | } | 
| Daniel Dunbar | 1ef29d2 | 2009-05-03 23:04:40 +0000 | [diff] [blame] | 27 |  | 
 | 28 | #pragma STDC CX_LIMITED_RANGE    // some long comment text and a brace, eh {} | 
| Chris Lattner | acfd65d | 2009-10-19 06:45:49 +0000 | [diff] [blame] | 29 |  | 
 | 30 |  | 
 | 31 | // CHECK: FILE:23:78 | 
| Daniel Dunbar | b3bacef | 2009-10-25 20:34:02 +0000 | [diff] [blame] | 32 | // CHECK: {{^  ...// some long comment text and a brace, eh {} }} | 
| Douglas Gregor | ce487ef | 2010-04-16 00:23:51 +0000 | [diff] [blame] | 33 |  | 
 | 34 | struct A { int x; }; | 
 | 35 | void h(struct A *a) { | 
 | 36 |   // CHECK-DOT: member | 
 | 37 |   // CHECK-DOT: reference | 
 | 38 |   // CHECK-DOT: type | 
 | 39 |   (void)a | 
 | 40 |           . | 
 | 41 |           x; | 
 | 42 | } |