| 1 |
# Check that the coverage statistics for template functions are calculated as expected. |
| 2 |
|
| 3 |
RUN: rm -rf %t |
| 4 |
RUN: mkdir %t |
| 5 |
RUN: cd %t |
| 6 |
RUN: cp %p/Inputs/tmpl* . |
| 7 |
|
| 8 |
RUN: llvm-cov gcov tmpl.cpp -f | FileCheck %s --check-prefix=F |
| 9 |
RUN: llvm-cov gcov tmpl.cpp -t | FileCheck %s --check-prefix=T |
| 10 |
|
| 11 |
F: Function '_Z4testILi1EEiv' |
| 12 |
F-NEXT: Lines executed:100.00% of 1 |
| 13 |
F: Function '_Z4testILi2EEiv' |
| 14 |
F-NEXT: Lines executed:100.00% of 1 |
| 15 |
|
| 16 |
T: -: 1:template <int N> |
| 17 |
T-NEXT: 2: 2:int test() { return N; } |
| 18 |
T-NEXT: -: 3: |
| 19 |
T-NEXT: 1: 4:int main() { return test<1>() + test<2>(); } |