Skip to content

Commit ef5219c

Browse files
committed
[clang][Driver] Correct OpenBSD UBSAN options test
The RUN here was mising ":" and there was no check file passed to FileCheck. This has been the case since this was originally added. UBSAN is the only sanitizer that is available for OpenBSD, but it does not add a simple "-fsanitize=undefined" instead it adds a bunch of smaller options. So check for those like the existing tests do.
1 parent 7c65443 commit ef5219c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/test/Driver/fsanitize.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,8 +548,8 @@
548548
// RUN: %clang --target=armv7-apple-ios7 -miphoneos-version-min=7.0 -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-IOS
549549
// CHECK-ASAN-IOS: -fsanitize=address
550550

551-
// RUN %clang --target=i386-pc-openbsd -fsanitize=undefined %s -### 2>&1 | FileCheck --check-prefix=CHECK-UBSAN-OPENBSD
552-
// CHECK-UBSAN-OPENBSD: -fsanitize=undefined
551+
// RUN: %clang --target=i386-pc-openbsd -fsanitize=undefined %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UBSAN-OPENBSD
552+
// CHECK-UBSAN-OPENBSD: "-fsanitize={{((signed-integer-overflow|integer-divide-by-zero|function|shift-base|shift-exponent|unreachable|return|vla-bound|alignment|null|vptr|pointer-overflow|float-cast-overflow|array-bounds|enum|bool|builtin|returns-nonnull-attribute|nonnull-attribute),?){19}"}}
553553

554554
// RUN: not %clang --target=i386-pc-openbsd -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-OPENBSD
555555
// CHECK-ASAN-OPENBSD: unsupported option '-fsanitize=address' for target 'i386-pc-openbsd'

0 commit comments

Comments
 (0)