2020-09-03 05:50:32 +08:00
|
|
|
// 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
|
2014-08-20 01:32:30 +08:00
|
|
|
|
|
|
|
#define M2 {
|
|
|
|
#define M1 M2
|
|
|
|
#define M22 }
|
|
|
|
#define M11 M22
|
|
|
|
|
2014-10-01 11:33:52 +08:00
|
|
|
// CHECK-LABEL: main:
|
2015-02-19 05:24:51 +08:00
|
|
|
// CHECK-NEXT: Expansion,File 0, [[@LINE+2]]:12 -> [[@LINE+2]]:14 = #0
|
|
|
|
// CHECK-NEXT: File 0, [[@LINE+1]]:14 -> [[@LINE+3]]:2 = #0
|
|
|
|
int main() M1
|
|
|
|
return 0;
|
2014-08-20 01:32:30 +08:00
|
|
|
}
|
2015-02-19 05:24:51 +08:00
|
|
|
// CHECK-NEXT: Expansion,File 1, 4:12 -> 4:14 = #0
|
|
|
|
// CHECK-NEXT: File 2, 3:12 -> 3:13 = #0
|
2014-10-01 11:33:52 +08:00
|
|
|
|
|
|
|
// CHECK-LABEL: func2:
|
2015-02-19 05:24:51 +08:00
|
|
|
// CHECK-NEXT: File 0, [[@LINE+2]]:14 -> [[@LINE+4]]:4 = #0
|
|
|
|
// CHECK-NEXT: Expansion,File 0, [[@LINE+3]]:1 -> [[@LINE+3]]:4 = #0
|
|
|
|
void func2() {
|
2014-08-20 01:32:30 +08:00
|
|
|
int x = 0;
|
2015-02-19 05:24:51 +08:00
|
|
|
M11
|
|
|
|
// CHECK-NEXT: Expansion,File 1, 6:13 -> 6:16 = #0
|
|
|
|
// CHECK-NEXT: File 2, 5:13 -> 5:14 = #0
|
2014-10-01 11:33:52 +08:00
|
|
|
|
|
|
|
// CHECK-LABEL: func3:
|
2015-02-19 05:24:51 +08:00
|
|
|
// CHECK-NEXT: Expansion,File 0, [[@LINE+3]]:14 -> [[@LINE+3]]:16 = #0
|
|
|
|
// CHECK-NEXT: File 0, [[@LINE+2]]:16 -> [[@LINE+4]]:4 = #0
|
|
|
|
// CHECK-NEXT: Expansion,File 0, [[@LINE+3]]:1 -> [[@LINE+3]]:4 = #0
|
|
|
|
void func3() M1
|
|
|
|
int x = 0;
|
|
|
|
M11
|
|
|
|
// CHECK-NEXT: Expansion,File 1, 4:12 -> 4:14 = #0
|
|
|
|
// CHECK-NEXT: Expansion,File 2, 6:13 -> 6:16 = #0
|
|
|
|
// CHECK-NEXT: File 3, 3:12 -> 3:13 = #0
|
|
|
|
// CHECK-NEXT: File 4, 5:13 -> 5:14 = #0
|
2014-08-20 01:32:30 +08:00
|
|
|
|
2014-10-01 11:33:52 +08:00
|
|
|
// CHECK-LABEL: func4:
|
2015-02-19 05:24:51 +08:00
|
|
|
// CHECK-NEXT: Expansion,File 0, [[@LINE+3]]:14 -> [[@LINE+3]]:16 = #0
|
|
|
|
// CHECK-NEXT: File 0, [[@LINE+2]]:16 -> [[@LINE+2]]:20 = #0
|
|
|
|
// CHECK-NEXT: Expansion,File 0, [[@LINE+1]]:17 -> [[@LINE+1]]:20 = #0
|
2014-10-01 11:33:52 +08:00
|
|
|
void func4() M1 M11
|
2015-02-19 05:24:51 +08:00
|
|
|
// CHECK-NEXT: Expansion,File 1, 4:12 -> 4:14 = #0
|
|
|
|
// CHECK-NEXT: Expansion,File 2, 6:13 -> 6:16 = #0
|
|
|
|
// CHECK-NEXT: File 3, 3:12 -> 3:13 = #0
|
|
|
|
// CHECK-NEXT: File 4, 5:13 -> 5:14 = #0
|