summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/ubsan-bitfields.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenCXX/ubsan-bitfields.cpp')
-rw-r--r--clang/test/CodeGenCXX/ubsan-bitfields.cpp21
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;
-}
OpenPOWER on IntegriCloud