brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 834d183 Raw
60 lines · c
1// RUN: %clang_cc1 -ftabstop 3 -fsyntax-only -Wno-error=int-conversion -fno-diagnostics-show-line-numbers %s 2>&1 | FileCheck -check-prefix=CHECK-3 -strict-whitespace %s2// RUN: %clang_cc1 -ftabstop 4 -fsyntax-only -Wno-error=int-conversion -fno-diagnostics-show-line-numbers %s 2>&1 | FileCheck -check-prefix=CHECK-4 -strict-whitespace %s3// RUN: %clang_cc1 -ftabstop 5 -fsyntax-only -Wno-error=int-conversion -fno-diagnostics-show-line-numbers %s 2>&1 | FileCheck -check-prefix=CHECK-5 -strict-whitespace %s4// RUN: %clang_cc1 -ftabstop 101 -fsyntax-only -Wno-error=int-conversion -fno-diagnostics-show-line-numbers %s 2>&1 | FileCheck -check-prefix=CHECK-101 -strict-whitespace %s5 6// tab7	void* a = 1;8 9// tab tab10		void* b = 1;11 12// 3x space tab13   	void* c = 1;14 15// tab at column 1016void* d =	1;17 18//CHECK-3: {{^   void\* a = 1;}}19//CHECK-3: {{^      void\* b = 1;}}20//CHECK-3: {{^      void\* c = 1;}}21//CHECK-3: {{^void\* d =   1;}}22 23//CHECK-4: {{^    void\* a = 1;}}24//CHECK-4: {{^        void\* b = 1;}}25//CHECK-4: {{^    void\* c = 1;}}26//CHECK-4: {{^void\* d =   1;}}27 28//CHECK-5: {{^     void\* a = 1;}}29//CHECK-5: {{^          void\* b = 1;}}30//CHECK-5: {{^     void\* c = 1;}}31//CHECK-5: {{^void\* d = 1;}}32 33// Test code modification hints34 35void f(void)36{37	if (0	& 1	== 1)38	{}39 40	if (1 == 0	& 1)41	{}42}43 44// CHECK-3: {{^   }}if (0 & 1   == 1)45// CHECK-3: {{^   }}        (       )46// CHECK-3: {{^   }}if (1 == 0  & 1)47// CHECK-3: {{^   }}    (     )48 49// CHECK-4: {{^    }}if (0   & 1 == 1)50// CHECK-4: {{^    }}          (     )51// CHECK-4: {{^    }}if (1 == 0  & 1)52// CHECK-4: {{^    }}    (     )53 54// CHECK-5: {{^     }}if (0     & 1  == 1)55// CHECK-5: {{^     }}            (      )56// CHECK-5: {{^     }}if (1 == 0     & 1)57// CHECK-5: {{^     }}    (     )58 59// CHECK-101: warning: ignoring invalid -ftabstop value '101', using default value 860