[clang] ef5219c - [clang][Driver] Correct OpenBSD UBSAN options test
David Spickett via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 1 07:55:36 PDT 2023
Author: David Spickett
Date: 2023-09-01T14:55:11Z
New Revision: ef5219c18b252ac36815d5f322acab704259df08
URL: https://github.com/llvm/llvm-project/commit/ef5219c18b252ac36815d5f322acab704259df08
DIFF: https://github.com/llvm/llvm-project/commit/ef5219c18b252ac36815d5f322acab704259df08.diff
LOG: [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.
Added:
Modified:
clang/test/Driver/fsanitize.c
Removed:
################################################################################
diff --git a/clang/test/Driver/fsanitize.c b/clang/test/Driver/fsanitize.c
index 3b9b399cb8235e..19e10f6043123f 100644
--- a/clang/test/Driver/fsanitize.c
+++ b/clang/test/Driver/fsanitize.c
@@ -548,8 +548,8 @@
// RUN: %clang --target=armv7-apple-ios7 -miphoneos-version-min=7.0 -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-IOS
// CHECK-ASAN-IOS: -fsanitize=address
-// RUN %clang --target=i386-pc-openbsd -fsanitize=undefined %s -### 2>&1 | FileCheck --check-prefix=CHECK-UBSAN-OPENBSD
-// CHECK-UBSAN-OPENBSD: -fsanitize=undefined
+// RUN: %clang --target=i386-pc-openbsd -fsanitize=undefined %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UBSAN-OPENBSD
+// 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}"}}
// RUN: not %clang --target=i386-pc-openbsd -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-OPENBSD
// CHECK-ASAN-OPENBSD: unsupported option '-fsanitize=address' for target 'i386-pc-openbsd'
More information about the cfe-commits
mailing list