summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/test/CodeGenCXX/ctor-dtor-alias.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/ctor-dtor-alias.cpp b/clang/test/CodeGenCXX/ctor-dtor-alias.cpp
index 1ab66a04d0d..ef56564d3dd 100644
--- a/clang/test/CodeGenCXX/ctor-dtor-alias.cpp
+++ b/clang/test/CodeGenCXX/ctor-dtor-alias.cpp
@@ -103,3 +103,19 @@ namespace test7 {
template class A<int>;
B::~B() {}
}
+
+namespace test8 {
+ // Test that we replace ~zed with ~bar which is an alias to ~foo.
+ // CHECK-DAG: call i32 @__cxa_atexit({{.*}}@_ZN5test83barD2Ev
+ // CHECK-DAG: @_ZN5test83barD2Ev = alias {{.*}} @_ZN5test83fooD2Ev
+ struct foo {
+ ~foo();
+ };
+ foo::~foo() {}
+ struct bar : public foo {
+ ~bar();
+ };
+ bar::~bar() {}
+ struct zed : public bar {};
+ zed foo;
+}
OpenPOWER on IntegriCloud