1 // RUN: %clang_tsan -O1 %s -o %t && %env_tsan_opts=suppressions='%s.supp' %run %t 2>&1 | FileCheck %s
2 #include "test.h"
3 
suppress_this(pthread_mutex_t * mu)4 void __attribute__((noinline)) suppress_this(pthread_mutex_t *mu) {
5   pthread_mutex_destroy(mu);
6 }
7 
main()8 int main() {
9   pthread_mutex_t mu;
10   pthread_mutex_init(&mu, 0);
11   pthread_mutex_lock(&mu);
12   suppress_this(&mu);
13   fprintf(stderr, "DONE\n");
14   return 0;
15 }
16 
17 // CHECK-NOT: failed to open suppressions file
18 // CHECK-NOT: WARNING: ThreadSanitizer:
19 // CHECK: DONE
20