• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t | FileCheck %s
2 extern "C" void AnnotateIgnoreReadsBegin(const char *f, int l);
3 extern "C" void AnnotateIgnoreReadsEnd(const char *f, int l);
4 
main()5 int main() {
6   AnnotateIgnoreReadsBegin("", 0);
7   AnnotateIgnoreReadsBegin("", 0);
8   AnnotateIgnoreReadsEnd("", 0);
9   AnnotateIgnoreReadsEnd("", 0);
10   AnnotateIgnoreReadsBegin("", 0);
11   AnnotateIgnoreReadsBegin("", 0);
12   AnnotateIgnoreReadsEnd("", 0);
13 }
14 
15 // CHECK: ThreadSanitizer: main thread finished with ignores enabled
16 // CHECK:   Ignore was enabled at:
17 // CHECK:     #0 AnnotateIgnoreReadsBegin
18 // CHECK:     #1 main {{.*}}thread_end_with_ignore3.cc:10
19 // CHECK:   Ignore was enabled at:
20 // CHECK:     #0 AnnotateIgnoreReadsBegin
21 // CHECK:     #1 main {{.*}}thread_end_with_ignore3.cc:11
22 
23