summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/catch-undef-behavior2.cpp
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2015-03-03 22:15:35 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2015-03-03 22:15:35 +0000
commit6cb698a584b64e3d9b4df022fcb70504b0c33348 (patch)
treeae0ac037ed5035426b792f7cfc424328ccd030f9 /test/CodeGenCXX/catch-undef-behavior2.cpp
parentb79099a8d86c8420bba56e01abbf27baa6c03639 (diff)
[UBSan] Split -fsanitize=shift into -fsanitize=shift-base and -fsanitize=shift-exponent.
-fsanitize=shift is now a group that includes both these checks, so exisiting users should not be affected. This change introduces two new UBSan kinds that sanitize only left-hand side and right-hand side of shift operation. In practice, invalid exponent value (negative or too large) tends to cause more portability problems, including inconsistencies between different compilers, crashes and inadequeate results on non-x86 architectures etc. That is, -fsanitize=shift-exponent failures should generally be addressed first. As a bonus, this change simplifies CodeGen implementation for emitting left shift (separate checks for base and exponent are now merged by the existing generic logic in EmitCheck()), and LLVM IR for these checks (the number of basic blocks is reduced). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231150 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/catch-undef-behavior2.cpp')
-rw-r--r--test/CodeGenCXX/catch-undef-behavior2.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/CodeGenCXX/catch-undef-behavior2.cpp b/test/CodeGenCXX/catch-undef-behavior2.cpp
index b8b31ca23f..6e9ca0c088 100644
--- a/test/CodeGenCXX/catch-undef-behavior2.cpp
+++ b/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) {