blob: af8a10601d2928bf475568eb2e9c25981b1eceb2 [file] [log] [blame]
Peter Collingbourne3afb2662016-04-28 17:09:37 +00001// RUN: %clang_cc1 -triple %itanium_abi_triple -fvisibility hidden -fms-extensions -fsanitize=cfi-vcall -emit-llvm -o - %s | FileCheck --check-prefix=CHECK --check-prefix=NOBL %s
2// RUN: echo "type:std::*" > %t.txt
3// RUN: %clang_cc1 -triple %itanium_abi_triple -fvisibility hidden -fms-extensions -fsanitize=cfi-vcall -fsanitize-blacklist=%t.txt -emit-llvm -o - %s | FileCheck --check-prefix=CHECK --check-prefix=NOSTD %s
4
5struct S1 {
6 virtual void f();
7};
8
9namespace std {
10
11struct S2 {
12 virtual void f();
13};
14
15}
16
17// CHECK: define{{.*}}s1f
Peter Collingbourne8dd14da2016-06-24 21:21:46 +000018// NOBL: llvm.type.test
19// NOSTD: llvm.type.test
Peter Collingbourne3afb2662016-04-28 17:09:37 +000020void s1f(S1 *s1) {
21 s1->f();
22}
23
24// CHECK: define{{.*}}s2f
Peter Collingbourne8dd14da2016-06-24 21:21:46 +000025// NOBL: llvm.type.test
26// NOSTD-NOT: llvm.type.test
Peter Collingbourne3afb2662016-04-28 17:09:37 +000027void s2f(std::S2 *s2) {
28 s2->f();
29}