1 // RUN: %clang_cc1 -triple x86_64-apple-darwin -x objective-c++ -fblocks -emit-llvm -o - %s | FileCheck -check-prefix=WITHOUT %s
2 // RUN: %clang_cc1 -triple x86_64-apple-darwin -x objective-c++ -fblocks -emit-llvm -o - %s -fsanitize=thread | FileCheck -check-prefix=TSAN %s
4 // WITHOUT-NOT: "sanitize_thread_no_checking_at_run_time"
6 __attribute__((objc_root_class))
13 ~NeedCleanup() __attribute__((no_sanitize("thread"))) {}
16 @interface MyObject : NSObject {
23 @implementation MyObject
31 // TSAN: initialize{{.*}}) [[ATTR:#[0-9]+]]
32 // TSAN: dealloc{{.*}}) [[ATTR:#[0-9]+]]
33 // TSAN: cxx_destruct{{.*}}) [[ATTR:#[0-9]+]]
36 extern void test2_helper(id (^)(void));
37 test2_helper(^{ return x; });
38 // TSAN: define linkonce_odr hidden void @__destroy_helper_block_8_32o(ptr noundef %0) unnamed_addr [[ATTR:#[0-9]+]]
41 // TSAN: attributes [[ATTR]] = { noinline nounwind {{.*}} "sanitize_thread_no_checking_at_run_time" {{.*}} }