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 
      6 // Check that we do not emit an enter marker for the main file.
      7 // CHECK-NOT: # 1 "{{.*}}line-directive-output.c" 1
      8 
      9 // CHECK: int a;
     10 
     11 // CHECK-NEXT: # 50 "{{.*}}line-directive-output.c"
     12 // CHECK-NEXT: int b;
     13 #line 50
     14 int b;
     15 
     16 // CHECK: # 13 "{{.*}}line-directive-output.c"
     17 // CHECK-NEXT: int c;
     18 # 13
     19 int c;
     20 
     21 
     22 // CHECK-NEXT: # 1 "A.c"
     23 #line 1 "A.c"
     24 // CHECK-NEXT: # 2 "A.c"
     25 #line 2
     26 
     27 // CHECK-NEXT: # 1 "B.c"
     28 #line 1 "B.c"
     29 
     30 // CHECK-NEXT: # 1000 "A.c"
     31 #line 1000 "A.c"
     32 
     33 int y;
     34 
     35 
     36 
     37 
     38 
     39 
     40 
     41 // CHECK: # 1010 "A.c"
     42 int z;
     43 
     44 extern int x;
     45 
     46 # 3 "temp2.h" 1
     47 extern int y;
     48 
     49 # 7 "A.c" 2
     50 extern int z;
     51 
     52 
     53 
     54 
     55 
     56 
     57 
     58 
     59 
     60 
     61 
     62 
     63 
     64 // CHECK: # 25 "A.c"
     65 
     66 
     67 // CHECK: # 50 "C.c" 1
     68 # 50 "C.c" 1
     69 
     70 
     71 // CHECK-NEXT: # 2000 "A.c" 2
     72 # 2000 "A.c" 2
     73 # 42 "A.c"
     74 # 44 "A.c"
     75 # 49 "A.c"
     76 
     77 // CHECK: # 50 "a\n.c"
     78 # 50 "a\012.c"
     79