2017-05-06 07:28:47 +08:00
|
|
|
// Tests -fsanitize-coverage=no-prune
|
2017-09-16 15:08:23 +08:00
|
|
|
|
2017-05-06 07:28:47 +08:00
|
|
|
// REQUIRES: has_sancovcc,stable-runtime
|
|
|
|
// UNSUPPORTED: i386-darwin
|
2020-05-27 03:51:46 +08:00
|
|
|
// XFAIL: ubsan
|
2017-10-11 08:32:03 +08:00
|
|
|
// XFAIL: android && asan
|
2017-09-16 15:08:23 +08:00
|
|
|
|
2017-05-06 07:28:47 +08:00
|
|
|
// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=trace-pc,bb,no-prune 2>&1 | grep "call void @__sanitizer_cov_trace_pc" | count 3
|
|
|
|
// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=trace-pc,bb 2>&1 | grep "call void @__sanitizer_cov_trace_pc" | count 2
|
|
|
|
// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=trace-pc,no-prune 2>&1 | grep "call void @__sanitizer_cov_trace_pc" | count 4
|
|
|
|
// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=trace-pc 2>&1 | grep "call void @__sanitizer_cov_trace_pc" | count 3
|
|
|
|
|
|
|
|
void foo(int *a) {
|
|
|
|
if (a)
|
|
|
|
*a = 1;
|
|
|
|
}
|