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 templates.cpp %s | FileCheck %s
|
2014-08-20 01:32:30 +08:00
|
|
|
|
|
|
|
template<typename T>
|
|
|
|
void unused(T x) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename T>
|
|
|
|
int func(T x) { // CHECK: func
|
|
|
|
if(x) // CHECK: func
|
|
|
|
return 0;
|
|
|
|
else
|
|
|
|
return 1;
|
|
|
|
int j = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
func<int>(0);
|
|
|
|
func<bool>(true);
|
|
|
|
return 0;
|
|
|
|
}
|