opnsense-src/test/CodeGenCXX/destructors.cpp

45 lines
449 B
C++
Raw Normal View History

2010-01-01 05:34:51 -05:00
// RUN: %clang_cc1 %s -emit-llvm -o -
2009-10-14 14:03:49 -04:00
struct A {
int a;
~A();
};
// Base with non-trivial destructor
struct B : A {
~B();
};
B::~B() { }
// Field with non-trivial destructor
struct C {
A a;
~C();
};
C::~C() { }
// PR5084
template<typename T>
class A1 {
~A1();
};
template<> A1<char>::~A1();
2009-11-18 09:59:57 -05:00
// PR5529
namespace PR5529 {
struct A {
~A();
};
A::~A() { }
struct B : A {
virtual ~B();
};
B::~B() {}
}