summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CodeGenCXX/thunks.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/thunks.cpp b/clang/test/CodeGenCXX/thunks.cpp
index 04d0820da7a..bf3b03e4e42 100644
--- a/clang/test/CodeGenCXX/thunks.cpp
+++ b/clang/test/CodeGenCXX/thunks.cpp
@@ -301,6 +301,32 @@ namespace Test12 {
// CHECK: getelementptr inbounds i8* {{.*}}, i64 8
}
+// PR13832
+namespace Test13 {
+ struct B1 {
+ virtual B1 &foo1();
+ };
+ struct Pad1 {
+ virtual ~Pad1();
+ };
+ struct Proxy1 : Pad1, B1 {
+ virtual ~Proxy1();
+ };
+ struct D : virtual Proxy1 {
+ virtual ~D();
+ virtual D &foo1();
+ };
+ D& D::foo1() {
+ return *this;
+ }
+ // CHECK: define {{.*}} @_ZTcvn8_n32_v8_n24_N6Test131D4foo1Ev
+ // CHECK: getelementptr inbounds i8* {{.*}}, i64 -8
+ // CHECK: getelementptr inbounds i8* {{.*}}, i64 -32
+ // CHECK: getelementptr inbounds i8* {{.*}}, i64 -24
+ // CHECK: getelementptr inbounds i8* {{.*}}, i64 8
+ // CHECK: ret %"struct.Test13::D"*
+}
+
/**** The following has to go at the end of the file ****/
// This is from Test5:
OpenPOWER on IntegriCloud