summaryrefslogtreecommitdiff
path: root/test/Lexer/has_feature_thread_sanitizer.cpp
blob: 0a248100c876f5e94659f7cfae4a4b987bfd6808 (plain)
1
2
3
4
5
6
7
8
9
10
11
// RUN: %clang_cc1 -E -fsanitize=thread %s -o - | FileCheck --check-prefix=CHECK-TSAN %s
// RUN: %clang_cc1 -E  %s -o - | FileCheck --check-prefix=CHECK-NO-TSAN %s

#if __has_feature(thread_sanitizer)
int ThreadSanitizerEnabled();
#else
int ThreadSanitizerDisabled();
#endif

// CHECK-TSAN: ThreadSanitizerEnabled
// CHECK-NO-TSAN: ThreadSanitizerDisabled