1 // Make sure coverage is dumped even if there are reported leaks.
3 // RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s -o %t
7 // RUN: mkdir -p %t-dir
8 // RUN: %env_asan_opts=coverage=1:coverage_dir=%t-dir:verbosity=1 not %run %t 2>&1 | FileCheck %s
9 // RUN: %sancov print %t-dir/*.sancov 2>&1
11 // REQUIRES: leak-detection
12 // FIXME: sancov paths not work with adb
13 // UNSUPPORTED: android
15 int main(int argc
, char **argv
) {
16 for (int i
= 0; i
< 10; ++i
)
21 // CHECK: LeakSanitizer: detected memory leaks
22 // CHECK: SanitizerCoverage: {{.*}}PCs written