Files
clang-p2996/compiler-rt/test/tsan/Darwin/objc-synchronize-nested-recursive.mm
Julian Lettner d9b062ad87 [TSan][Darwin] Remove unnecessary lit substitution
We don't test on very old versions of Apple platforms anymore.  The
following lit substitution concerning the minimum deployment target for
ARC support can be removed.

```
%darwin_min_target_with_full_runtime_arc_support -> 10.11
```

Differential Revision: https://reviews.llvm.org/D85803
2020-08-20 13:00:32 -07:00

36 lines
663 B
Plaintext

// RUN: %clangxx_tsan %s -o %t -framework Foundation -fobjc-arc
// RUN: %run %t 2>&1 | FileCheck %s
#import <Foundation/Foundation.h>
int main() {
@autoreleasepool {
NSObject* obj1 = [NSObject new];
NSObject* obj2 = [NSObject new];
@synchronized(obj1) {
@synchronized(obj1) {
NSLog(@"nested 1-1");
// CHECK: nested 1-1
}
}
@synchronized(obj1) {
@synchronized(obj2) {
@synchronized(obj1) {
@synchronized(obj2) {
NSLog(@"nested 1-2-1-2");
// CHECK: nested 1-2-1-2
}
}
}
}
}
NSLog(@"PASS");
// CHECK-NOT: ThreadSanitizer
// CHECK: PASS
return 0;
}