1 // RUN: %clang_cc1 -mllvm -emptyline-comment-coverage=false -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name macroception.c %s | FileCheck %s 2 3 #define M2 { 4 #define M1 M2 5 #define M22 } 6 #define M11 M22 7 8 // CHECK-LABEL: main: 9 // CHECK-NEXT: Expansion,File 0, [[@LINE+2]]:12 -> [[@LINE+2]]:14 = #0 10 // CHECK-NEXT: File 0, [[@LINE+1]]:14 -> [[@LINE+3]]:2 = #0 11 int main() M1 12 return 0; 13 } 14 // CHECK-NEXT: Expansion,File 1, 4:12 -> 4:14 = #0 15 // CHECK-NEXT: File 2, 3:12 -> 3:13 = #0 16 17 // CHECK-LABEL: func2: 18 // CHECK-NEXT: File 0, [[@LINE+2]]:14 -> [[@LINE+4]]:4 = #0 19 // CHECK-NEXT: Expansion,File 0, [[@LINE+3]]:1 -> [[@LINE+3]]:4 = #0 20 void func2() { 21 int x = 0; 22 M11 23 // CHECK-NEXT: Expansion,File 1, 6:13 -> 6:16 = #0 24 // CHECK-NEXT: File 2, 5:13 -> 5:14 = #0 25 26 // CHECK-LABEL: func3: 27 // CHECK-NEXT: Expansion,File 0, [[@LINE+3]]:14 -> [[@LINE+3]]:16 = #0 28 // CHECK-NEXT: File 0, [[@LINE+2]]:16 -> [[@LINE+4]]:4 = #0 29 // CHECK-NEXT: Expansion,File 0, [[@LINE+3]]:1 -> [[@LINE+3]]:4 = #0 30 void func3() M1 31 int x = 0; 32 M11 33 // CHECK-NEXT: Expansion,File 1, 4:12 -> 4:14 = #0 34 // CHECK-NEXT: Expansion,File 2, 6:13 -> 6:16 = #0 35 // CHECK-NEXT: File 3, 3:12 -> 3:13 = #0 36 // CHECK-NEXT: File 4, 5:13 -> 5:14 = #0 37 38 // CHECK-LABEL: func4: 39 // CHECK-NEXT: Expansion,File 0, [[@LINE+3]]:14 -> [[@LINE+3]]:16 = #0 40 // CHECK-NEXT: File 0, [[@LINE+2]]:16 -> [[@LINE+2]]:20 = #0 41 // CHECK-NEXT: Expansion,File 0, [[@LINE+1]]:17 -> [[@LINE+1]]:20 = #0 42 void func4() M1 M11 43 // CHECK-NEXT: Expansion,File 1, 4:12 -> 4:14 = #0 44 // CHECK-NEXT: Expansion,File 2, 6:13 -> 6:16 = #0 45 // CHECK-NEXT: File 3, 3:12 -> 3:13 = #0 46 // CHECK-NEXT: File 4, 5:13 -> 5:14 = #0 47