blob: 290703a50e3bae3653d3e120349baf9e2e4608f7 [file] [log] [blame]
Chris Lattner88aae912010-04-13 00:01:41 +00001// RUN: %clang_cc1 -E %s 2>&1 | FileCheck %s -strict-whitespace
2// PR6101
3int a;
Chris Lattner86d0ef72010-04-14 04:28:50 +00004// CHECK: # 1 "{{.*}}line-directive-output.c"
Chris Lattner88aae912010-04-13 00:01:41 +00005// CHECK: int a;
6
7// CHECK-NEXT: # 50 "{{.*}}line-directive-output.c"
8// CHECK-NEXT: int b;
9#line 50
10int b;
11
12// CHECK: # 13 "{{.*}}line-directive-output.c"
13// CHECK-NEXT: int c;
14# 13
15int c;
16
17
18// CHECK-NEXT: # 1 "A.c"
19#line 1 "A.c"
20// CHECK-NEXT: # 2 "A.c"
21#line 2
22
23// CHECK-NEXT: # 1 "B.c"
24#line 1 "B.c"
25
26// CHECK-NEXT: # 1000 "A.c"
27#line 1000 "A.c"
28
29int y;
30
31
32
33
34
35
36
37// CHECK: # 1010 "A.c"
38int z;
39
40extern int x;
41
42# 3 "temp2.h" 1
43extern int y;
44
45# 7 "A.c" 2
46extern int z;
47
48
49
50
51
52
53
54
55
56
57
58
59
60// CHECK: # 25 "A.c"
61
62
63// CHECK: # 50 "C.c" 1
64# 50 "C.c" 1
65
66
67// CHECK-NEXT: # 2000 "A.c" 2
68# 2000 "A.c" 2
69# 42 "A.c"
70# 44 "A.c"
71# 49 "A.c"