Home | History | Annotate | Download | only in Preprocessor
      1 // RUN: %clang_cc1 -E %s 2>&1 | FileCheck %s -strict-whitespace
      2 // PR6101
      3 int a;
      4 // CHECK: # 1 "{{.*}}line-directive-output.c"
      5 // CHECK: int a;
      6 
      7 // CHECK-NEXT: # 50 "{{.*}}line-directive-output.c"
      8 // CHECK-NEXT: int b;
      9 #line 50
     10 int b;
     11 
     12 // CHECK: # 13 "{{.*}}line-directive-output.c"
     13 // CHECK-NEXT: int c;
     14 # 13
     15 int 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 
     29 int y;
     30 
     31 
     32 
     33 
     34 
     35 
     36 
     37 // CHECK: # 1010 "A.c"
     38 int z;
     39 
     40 extern int x;
     41 
     42 # 3 "temp2.h" 1
     43 extern int y;
     44 
     45 # 7 "A.c" 2
     46 extern 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"
     72