1 // RUN: %clangxx_tsan %s -o %t -framework Foundation -fobjc-arc
2 // RUN: not %run %t 2>&1 | FileCheck %s
3 // RUN: %env_tsan_opts=detect_deadlocks=1 not %run %t 2>&1 | FileCheck %s
4 // RUN: %env_tsan_opts=detect_deadlocks=0 %run %t 2>&1 | FileCheck %s --check-prefix=DISABLED
6 #import <Foundation/Foundation.h>
10 NSObject* obj1 = [NSObject new];
11 NSObject* obj2 = [NSObject new];
22 // CHECK: ThreadSanitizer: lock-order-inversion (potential deadlock)
28 // DISABLED-NOT: ThreadSanitizer