1 // RUN: %clang_cc1 -ftabstop 3 -fsyntax-only %s 2>&1 | FileCheck -check-prefix=3 -strict-whitespace %s
2 // RUN: %clang_cc1 -ftabstop 4 -fsyntax-only %s 2>&1 | FileCheck -check-prefix=4 -strict-whitespace %s
3 // RUN: %clang_cc1 -ftabstop 5 -fsyntax-only %s 2>&1 | FileCheck -check-prefix=5 -strict-whitespace %s
4
5 // tab
6 void* a = 1;
7
8 // tab tab
9 void* b = 1;
10
11 // 3x space tab
12 void* c = 1;
13
14 // tab at column 10
15 void* d = 1;
16
17 //CHECK-3: {{^ void\* a = 1;}}
18 //CHECK-3: {{^ void\* b = 1;}}
19 //CHECK-3: {{^ void\* c = 1;}}
20 //CHECK-3: {{^void\* d = 1;}}
21
22 //CHECK-4: {{^ void\* a = 1;}}
23 //CHECK-4: {{^ void\* b = 1;}}
24 //CHECK-4: {{^ void\* c = 1;}}
25 //CHECK-4: {{^void\* d = 1;}}
26
27 //CHECK-5: {{^ void\* a = 1;}}
28 //CHECK-5: {{^ void\* b = 1;}}
29 //CHECK-5: {{^ void\* c = 1;}}
30 //CHECK-5: {{^void\* d = 1;}}
31
32 // Test code modification hints
33
f(void)34 void f(void)
35 {
36 if (0 & 1 == 1)
37 {}
38 }
39
40 // CHECK-3: {{^ }}if (0 & 1 == 1)
41 // CHECK-3: {{^ }} ( )
42
43 // CHECK-4: {{^ }}if (0 & 1 == 1)
44 // CHECK-4: {{^ }} ( )
45
46 // CHECK-5: {{^ }}if (0 & 1 == 1)
47 // CHECK-5: {{^ }} ( )
48