blob: 62e5316dde58eb2bcee1e1f05cd000eb7fe98bae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// RUN: %clang -E -fsanitize=undefined %s -o - | FileCheck --check-prefix=CHECK-UBSAN %s
// RUN: %clang -E -fsanitize=alignment %s -o - | FileCheck --check-prefix=CHECK-ALIGNMENT %s
// RUN: %clang -E %s -o - | FileCheck --check-prefix=CHECK-NO-UBSAN %s
#if __has_feature(undefined_behavior_sanitizer)
int UBSanEnabled();
#else
int UBSanDisabled();
#endif
// CHECK-UBSAN: UBSanEnabled
// CHECK-ALIGNMENT: UBSanEnabled
// CHECK-NO-UBSAN: UBSanDisabled
|