Mercurial > hg > CbC > CbC_llvm
annotate clang/test/CodeGenCXX/wasm-sanitize-vptr.cpp @ 206:f17a3b42b08b
Added tag before-12 for changeset b7591485f4cd
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 07 Jun 2021 21:25:57 +0900 |
parents | 1d019706d866 |
children |
rev | line source |
---|---|
150 | 1 // RUN: %clang_cc1 -std=c++11 -fsanitize=vptr -emit-llvm %s -o - -triple wasm32-unknown-emscripten | FileCheck %s |
2 | |
3 struct S { | |
4 virtual ~S() {} | |
5 int a; | |
6 }; | |
7 | |
8 struct T : S { | |
9 int b; | |
10 }; | |
11 | |
12 // CHECK-LABEL: @_Z15bad_static_castv | |
13 void bad_static_cast() { | |
14 S s; | |
15 // CHECK: br i1 %[[NONNULL:.*]], label %[[CONT:.*]], label %[[MISS:.*]], !prof | |
16 // CHECK: [[MISS]]: | |
17 // CHECK: call void @__ubsan_handle_dynamic_type_cache_miss_abort | |
18 // CHECK: [[CONT]]: | |
19 T &r = static_cast<T &>(s); | |
20 } |