blob: a196c13f8f42017c58e2afaf788ebf0e7e2f3286 [file] [log] [blame]
Anders Carlsson174754c2009-09-01 18:33:46 +00001// RUN: clang-cc %s -emit-llvm -o -
2struct A {
3 int a;
4
5 ~A();
6};
7
8// Base with non-trivial destructor
9struct B : A {
10 ~B();
11};
12
13B::~B() { }
14
15// Field with non-trivial destructor
16struct C {
17 A a;
18
19 ~C();
20};
21
Douglas Gregor45132722009-10-01 20:44:19 +000022C::~C() { }
23
24// PR5084
25template<typename T>
26class A1 {
27 ~A1();
28};
29
30template<> A1<char>::~A1();
Anders Carlsson9f853df2009-11-17 04:44:12 +000031
32// PR5529
33namespace PR5529 {
34 struct A {
35 ~A();
36 };
37
38 A::~A() { }
39 struct B : A {
40 virtual ~B();
41 };
42
43 B::~B() {}
44}