1 // RUN: %clang_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s
8 extern "C" void AnnotateIgnoreWritesBegin(const char *f
, int l
);
9 extern "C" void AnnotateIgnoreWritesEnd(const char *f
, int l
);
10 extern "C" void AnnotateIgnoreReadsBegin(const char *f
, int l
);
11 extern "C" void AnnotateIgnoreReadsEnd(const char *f
, int l
);
13 void *Thread(void *x
) {
14 AnnotateIgnoreWritesBegin(__FILE__
, __LINE__
);
15 AnnotateIgnoreReadsBegin(__FILE__
, __LINE__
);
17 AnnotateIgnoreReadsEnd(__FILE__
, __LINE__
);
18 AnnotateIgnoreWritesEnd(__FILE__
, __LINE__
);
24 pthread_create(&t
, 0, Thread
, 0);
31 // CHECK-NOT: WARNING: ThreadSanitizer: data race