From b15683e6357b1786ac26779cf377ea6cdebb8497 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Mon, 11 Nov 2013 19:35:06 +0000 Subject: Fix pr17875. The assert this patch deletes was valid only when aliasing D2 to D1, not when looking at a base class. Since the assert was in the path where we had already decided to not produce an alias, just drop it. llvm-svn: 194411 --- clang/test/CodeGenCXX/ctor-dtor-alias.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'clang/test/CodeGenCXX/ctor-dtor-alias.cpp') diff --git a/clang/test/CodeGenCXX/ctor-dtor-alias.cpp b/clang/test/CodeGenCXX/ctor-dtor-alias.cpp index 745495ac68f..1ab66a04d0d 100644 --- a/clang/test/CodeGenCXX/ctor-dtor-alias.cpp +++ b/clang/test/CodeGenCXX/ctor-dtor-alias.cpp @@ -88,3 +88,18 @@ namespace test6 { B X; // CHECK-DAG: call i32 @__cxa_atexit({{.*}}@_ZN5test61AD2Ev } + +namespace test7 { + // Test that we don't produce an alias from ~B to ~A (or crash figuring + // out if we should). + // pr17875. + // CHECK-DAG: define void @_ZN5test71BD2Ev + template struct A { + ~A() {} + }; + class B : A { + ~B(); + }; + template class A; + B::~B() {} +} -- cgit v1.2.3