has_feature_thread_sanitizer.cpp 356 B

1234567891011
  1. // RUN: %clang_cc1 -E -fsanitize=thread %s -o - | FileCheck --check-prefix=CHECK-TSAN %s
  2. // RUN: %clang_cc1 -E %s -o - | FileCheck --check-prefix=CHECK-NO-TSAN %s
  3. #if __has_feature(thread_sanitizer)
  4. int ThreadSanitizerEnabled();
  5. #else
  6. int ThreadSanitizerDisabled();
  7. #endif
  8. // CHECK-TSAN: ThreadSanitizerEnabled
  9. // CHECK-NO-TSAN: ThreadSanitizerDisabled