1 // RUN: %clang_cc1 -E -fsanitize=address %s -o - | FileCheck --check-prefix=CHECK-ASAN %s
2 // RUN: %clang_cc1 -E -fsanitize=kernel-address %s -o - | FileCheck --check-prefix=CHECK-ASAN %s
3 // RUN: %clang_cc1 -E -fsanitize=hwaddress %s -o - | FileCheck --check-prefix=CHECK-HWASAN %s
4 // RUN: %clang_cc1 -E -fsanitize=kernel-hwaddress %s -o - | FileCheck --check-prefix=CHECK-HWASAN %s
5 // RUN: %clang_cc1 -E %s -o - | FileCheck --check-prefix=CHECK-NO-ASAN %s
7 #if __has_feature(address_sanitizer)
8 int AddressSanitizerEnabled();
10 int AddressSanitizerDisabled();
13 #if __has_feature(hwaddress_sanitizer)
14 int HWAddressSanitizerEnabled();
16 int HWAddressSanitizerDisabled();
19 // CHECK-ASAN: AddressSanitizerEnabled
20 // CHECK-ASAN: HWAddressSanitizerDisabled
22 // CHECK-HWASAN: AddressSanitizerDisabled
23 // CHECK-HWASAN: HWAddressSanitizerEnabled
25 // CHECK-NO-ASAN: AddressSanitizerDisabled
26 // CHECK-NO-ASAN: HWAddressSanitizerDisabled