diff options
| author | Vedant Kumar <vsk@apple.com> | 2017-03-09 00:18:53 +0000 |
|---|---|---|
| committer | Vedant Kumar <vsk@apple.com> | 2017-03-09 00:18:53 +0000 |
| commit | 3dea91fec6354451d36c3afc31fd4ac8674d8b5a (patch) | |
| tree | e411288da420a579eb85940f650679df995382c0 /clang/test/CodeGenCXX/ubsan-bitfields.cpp | |
| parent | 5e5d8672a7d648417d50e2cde81659ebda2c8161 (diff) | |
| download | bcm5719-llvm-3dea91fec6354451d36c3afc31fd4ac8674d8b5a.tar.gz bcm5719-llvm-3dea91fec6354451d36c3afc31fd4ac8674d8b5a.zip | |
Revert "[ubsan] Detect UB loads from bitfields"
This reverts commit r297298. It breaks the self-host on this bot:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/962/steps/build%20clang%2Fubsan/logs/stdio
llvm-svn: 297331
Diffstat (limited to 'clang/test/CodeGenCXX/ubsan-bitfields.cpp')
| -rw-r--r-- | clang/test/CodeGenCXX/ubsan-bitfields.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/clang/test/CodeGenCXX/ubsan-bitfields.cpp b/clang/test/CodeGenCXX/ubsan-bitfields.cpp deleted file mode 100644 index c8e9d9be09a..00000000000 --- a/clang/test/CodeGenCXX/ubsan-bitfields.cpp +++ /dev/null @@ -1,21 +0,0 @@ -// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin10 -emit-llvm -o - %s -fsanitize=enum | FileCheck %s - -enum E { - a = 1, - b = 2, - c = 3 -}; - -struct S { - E e1 : 10; -}; - -// CHECK-LABEL: define i32 @_Z4loadP1S -E load(S *s) { - // CHECK: [[LOAD:%.*]] = load i16, i16* {{.*}} - // CHECK: [[CLEAR:%.*]] = and i16 [[LOAD]], 1023 - // CHECK: [[CAST:%.*]] = zext i16 [[CLEAR]] to i32 - // CHECK: icmp ule i32 [[CAST]], 3, !nosanitize - // CHECK: call void @__ubsan_handle_load_invalid_value - return s->e1; -} |

