summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/bounds-checking.c
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2015-06-18 23:59:22 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2015-06-18 23:59:22 +0000
commit9881b78b53dd295f7ee63bf33c99d68b73c2f289 (patch)
tree0c8f81af4719ee09af6acf7b09fc1a6854ed346f /clang/test/CodeGen/bounds-checking.c
parentc847e7e54372dd823264a1358a085c237baec8ed (diff)
downloadbcm5719-llvm-9881b78b53dd295f7ee63bf33c99d68b73c2f289.tar.gz
bcm5719-llvm-9881b78b53dd295f7ee63bf33c99d68b73c2f289.zip
Introduce -fsanitize-trap= flag.
This flag controls whether a given sanitizer traps upon detecting an error. It currently only supports UBSan. The existing flag -fsanitize-undefined-trap-on-error has been made an alias of -fsanitize-trap=undefined. This change also cleans up some awkward behavior around the combination of -fsanitize-trap=undefined and -fsanitize=undefined. Previously we would reject command lines containing the combination of these two flags, as -fsanitize=vptr is not compatible with trapping. This required the creation of -fsanitize=undefined-trap, which excluded -fsanitize=vptr (and -fsanitize=function, but this seems like an oversight). Now, -fsanitize=undefined is an alias for -fsanitize=undefined-trap, and if -fsanitize-trap=undefined is specified, we treat -fsanitize=vptr as an "unsupported" flag, which means that we error out if the flag is specified explicitly, but implicitly disable it if the flag was implied by -fsanitize=undefined. Differential Revision: http://reviews.llvm.org/D10464 llvm-svn: 240105
Diffstat (limited to 'clang/test/CodeGen/bounds-checking.c')
-rw-r--r--clang/test/CodeGen/bounds-checking.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/CodeGen/bounds-checking.c b/clang/test/CodeGen/bounds-checking.c
index d93cd3ede7d..90b7f0f6523 100644
--- a/clang/test/CodeGen/bounds-checking.c
+++ b/clang/test/CodeGen/bounds-checking.c
@@ -1,5 +1,5 @@
// RUN: %clang_cc1 -fsanitize=local-bounds -emit-llvm -triple x86_64-apple-darwin10 %s -o - | FileCheck %s
-// RUN: %clang_cc1 -fsanitize=array-bounds -O -fsanitize-undefined-trap-on-error -emit-llvm -triple x86_64-apple-darwin10 -DNO_DYNAMIC %s -o - | FileCheck %s
+// RUN: %clang_cc1 -fsanitize=array-bounds -O -fsanitize-trap=array-bounds -emit-llvm -triple x86_64-apple-darwin10 -DNO_DYNAMIC %s -o - | FileCheck %s
// CHECK-LABEL: @f
double f(int b, int i) {
OpenPOWER on IntegriCloud