Richard Smith | c195c25 | 2018-11-27 19:33:49 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple x86_64-linux-gnu %s -O2 -disable-llvm-passes -emit-llvm -o - | FileCheck %s |
| 2 | struct A { virtual ~A(); }; |
| 3 | template<typename T> struct B : virtual A { |
| 4 | ~B() override {} |
| 5 | }; |
| 6 | struct C : B<int>, B<float> { C(); ~C() override; }; |
| 7 | struct D : C { ~D() override; }; |
| 8 | |
| 9 | // We must not create a reference to B<int>::~B() here, because we're not going to emit it. |
| 10 | // CHECK-NOT: @_ZN1BIiED1Ev |
| 11 | // CHECK-NOT: @_ZTC1D0_1BIiE = |
| 12 | // CHECK-NOT: @_ZTT1D = available_externally |
| 13 | D *p = new D; |