summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/catch-undef-behavior2.cpp
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2015-03-09 21:50:19 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2015-03-09 21:50:19 +0000
commit21d2dda3d2e2772ce9b1f368fd97a4a3cfc5aa8e (patch)
tree9851805be42dfeb94f771973cad5ce99ec64fba0 /clang/test/CodeGenCXX/catch-undef-behavior2.cpp
parent2efa2d01d73cc1971985dd9628982e1523f24bc6 (diff)
downloadbcm5719-llvm-21d2dda3d2e2772ce9b1f368fd97a4a3cfc5aa8e.tar.gz
bcm5719-llvm-21d2dda3d2e2772ce9b1f368fd97a4a3cfc5aa8e.zip
[UBSan] Split -fsanitize=shift into -fsanitize=shift-base and -fsanitize=shift-exponent.
This is a recommit of r231150, reverted in r231409. Turns out that -fsanitize=shift-base check implementation only works if the shift exponent is valid, otherwise it contains undefined behavior itself. Make sure we check that exponent is valid before we proceed to check the base. Make sure that we actually report invalid values of base or exponent if -fsanitize=shift-base or -fsanitize=shift-exponent is specified, respectively. llvm-svn: 231711
Diffstat (limited to 'clang/test/CodeGenCXX/catch-undef-behavior2.cpp')
-rw-r--r--clang/test/CodeGenCXX/catch-undef-behavior2.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/CodeGenCXX/catch-undef-behavior2.cpp b/clang/test/CodeGenCXX/catch-undef-behavior2.cpp
index b8b31ca23f5..6e9ca0c0888 100644
--- a/clang/test/CodeGenCXX/catch-undef-behavior2.cpp
+++ b/clang/test/CodeGenCXX/catch-undef-behavior2.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++11 -fsanitize=signed-integer-overflow,integer-divide-by-zero,float-divide-by-zero,shift,unreachable,return,vla-bound,alignment,null,vptr,object-size,float-cast-overflow,bool,enum,array-bounds,function -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -fsanitize=signed-integer-overflow,integer-divide-by-zero,float-divide-by-zero,shift-base,shift-exponent,unreachable,return,vla-bound,alignment,null,vptr,object-size,float-cast-overflow,bool,enum,array-bounds,function -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck %s
bool GetOptionalBool(bool *value);
bool GetBool(bool default_value) {
OpenPOWER on IntegriCloud