1 // RUN: %clangxx_tsan %s -o %t -framework Foundation
2 // RUN: %run %t 2>&1 | FileCheck %s
4 #import <Foundation/Foundation.h>
10 fprintf(stderr, "~InnerStruct\n");
15 std::shared_ptr<InnerStruct> inner_object;
17 fprintf(stderr, "~MyStruct\n");
21 int main(int argc, const char *argv[]) {
22 fprintf(stderr, "Hello world.\n");
25 std::shared_ptr<MyStruct> shared(new MyStruct());
26 shared->inner_object = std::shared_ptr<InnerStruct>(new InnerStruct());
29 fprintf(stderr, "Done.\n");
32 // CHECK: Hello world.
34 // CHECK: ~InnerStruct
36 // CHECK-NOT: WARNING: ThreadSanitizer