blob: 5e42121d2b7bd8550904aa7d5bdb05d4bc90e881 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
/* { dg-do compile { target { c || c++11 } } } */
/* { dg-options "-Wleading-whitespace=tabs" } */
int i1; /* tab ok */
int i2; /* 3 tabs ok */
int i3; /* 8 spaces not ok */
/* { dg-warning "whitespace other than tabs in leading whitespace" "" { target *-*-* } .-1 } */
int i4; /* tab 8 spaces not ok */
/* { dg-warning "whitespace other than tabs in leading whitespace" "" { target *-*-* } .-1 } */
int i5; /* 4 spaces tab not ok */
/* { dg-warning "whitespace other than tabs in leading whitespace" "" { target *-*-* } .-1 } */
int i6; /* space tab not ok */
/* { dg-warning "whitespace other than tabs in leading whitespace" "" { target *-*-* } .-1 } */
int i7; /* tab vtab not ok */
/* { dg-warning "whitespace other than tabs in leading whitespace" "" { target *-*-* } .-1 } */
int i8; /* tab form-feed not ok */
/* { dg-warning "whitespace other than tabs in leading whitespace" "" { target *-*-* } .-1 } */
int i9; /* 4 spaces vtab not ok */
/* { dg-warning "whitespace other than tabs in leading whitespace" "" { target *-*-* } .-1 } */
int i10; /* 2 spaces form-feed not ok */
/* { dg-warning "whitespace other than tabs in leading whitespace" "" { target *-*-* } .-1 } */
int i20; /* 2 spaces not ok */
/* { dg-warning "whitespace other than tabs in leading whitespace" "" { target *-*-* } .-1 } */
/* Just whitespace on a line is something for -Wtrailing-whitespace. */
int \
i11, \
i12, \
i13, \
i14, \
i15, \
i16, \
i17;
/* { dg-warning "whitespace other than tabs in leading whitespace" "" { target *-*-* } .-6 } */
/* { dg-warning "whitespace other than tabs in leading whitespace" "" { target *-*-* } .-6 } */
/* { dg-warning "whitespace other than tabs in leading whitespace" "" { target *-*-* } .-6 } */
/* { dg-warning "whitespace other than tabs in leading whitespace" "" { target *-*-* } .-6 } */
/* { dg-warning "whitespace other than tabs in leading whitespace" "" { target *-*-* } .-6 } */
/* { dg-warning "whitespace other than tabs in leading whitespace" "" { target *-*-* } .-6 } */
/* { dg-warning "whitespace other than tabs in leading whitespace" "" { target *-*-* } .+1 } */
const char *p = R"*|*(
a
b
c
d
e
f
g
)*|*";
/* This is a comment with leading whitespace non-issues and issues
a
b
c
d
e
f
g
*/
/* { dg-warning "whitespace other than tabs in leading whitespace" "" { target *-*-* } .-7 } */
/* { dg-warning "whitespace other than tabs in leading whitespace" "" { target *-*-* } .-7 } */
/* { dg-warning "whitespace other than tabs in leading whitespace" "" { target *-*-* } .-7 } */
/* { dg-warning "whitespace other than tabs in leading whitespace" "" { target *-*-* } .-7 } */
/* { dg-warning "whitespace other than tabs in leading whitespace" "" { target *-*-* } .-7 } */
/* { dg-warning "whitespace other than tabs in leading whitespace" "" { target *-*-* } .-7 } */
|