2016-02-05 02:39:09 +08:00
|
|
|
// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name header.cpp %s > %tmapping
|
2014-08-21 01:29:47 +08:00
|
|
|
// RUN: FileCheck -input-file %tmapping %s --check-prefix=CHECK-FUNC
|
|
|
|
// RUN: FileCheck -input-file %tmapping %s --check-prefix=CHECK-STATIC-FUNC
|
|
|
|
// RUN: FileCheck -input-file %tmapping %s --check-prefix=CHECK-STATIC-FUNC2
|
2014-08-20 01:32:30 +08:00
|
|
|
|
|
|
|
#include "Inputs/header1.h"
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
func(1);
|
|
|
|
static_func(2);
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK-FUNC: func
|
2015-02-04 05:35:49 +08:00
|
|
|
// CHECK-FUNC: File 0, 4:25 -> 11:2 = #0
|
|
|
|
// CHECK-FUNC: File 0, 6:15 -> 8:4 = #1
|
|
|
|
// CHECK-FUNC: File 0, 8:10 -> 10:4 = (#0 - #1)
|
2014-08-20 01:32:30 +08:00
|
|
|
|
|
|
|
// CHECK-STATIC-FUNC: static_func
|
2015-02-04 05:35:49 +08:00
|
|
|
// CHECK-STATIC-FUNC: File 0, 12:32 -> 20:2 = #0
|
|
|
|
// CHECK-STATIC-FUNC: File 0, 14:15 -> 16:4 = #1
|
|
|
|
// CHECK-STATIC-FUNC: File 0, 16:10 -> 18:4 = (#0 - #1)
|
2014-08-20 01:32:30 +08:00
|
|
|
|
|
|
|
// CHECK-STATIC-FUNC2: static_func2
|
2015-02-04 05:35:49 +08:00
|
|
|
// CHECK-STATIC-FUNC2: File 0, 21:33 -> 29:2 = 0
|