Home | History | Annotate | Download | only in lit_tests
      1 // RUN: %clang_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s
      2 #include <pthread.h>
      3 #include <unistd.h>
      4 #include <stdio.h>
      5 
      6 void *Thread(void *x) {
      7   sleep(10);
      8   return 0;
      9 }
     10 
     11 int main() {
     12   pthread_t t;
     13   pthread_create(&t, 0, Thread, 0);
     14   printf("OK\n");
     15   return 0;
     16 }
     17 
     18 // CHECK-NOT: WARNING: ThreadSanitizer: thread leak
     19