summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/cfi-mfcall-incomplete.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenCXX/cfi-mfcall-incomplete.cpp')
-rw-r--r--clang/test/CodeGenCXX/cfi-mfcall-incomplete.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/cfi-mfcall-incomplete.cpp b/clang/test/CodeGenCXX/cfi-mfcall-incomplete.cpp
new file mode 100644
index 00000000000..345be124e93
--- /dev/null
+++ b/clang/test/CodeGenCXX/cfi-mfcall-incomplete.cpp
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux -fsanitize=cfi-mfcall -fsanitize-trap=cfi-mfcall -fvisibility hidden -emit-llvm -o - %s | FileCheck %s
+
+struct S;
+
+void f(S *s, void (S::*p)()) {
+ // CHECK-NOT: llvm.type.test
+ // CHECK: llvm.type.test{{.*}}!"_ZTSM1SFvvE.virtual"
+ // CHECK-NOT: llvm.type.test
+ (s->*p)();
+}
+
+// CHECK: declare i1 @llvm.type.test
OpenPOWER on IntegriCloud