From 6b8b4b459d0851ca7630a9584242df56687afc3c Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Tue, 1 Sep 2009 18:33:46 +0000 Subject: We can generate constructors/destructors with base classes and non-trivial fields just fine now. llvm-svn: 80701 --- clang/test/CodeGenCXX/destructors.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 clang/test/CodeGenCXX/destructors.cpp (limited to 'clang/test') diff --git a/clang/test/CodeGenCXX/destructors.cpp b/clang/test/CodeGenCXX/destructors.cpp new file mode 100644 index 00000000000..e8080577ff6 --- /dev/null +++ b/clang/test/CodeGenCXX/destructors.cpp @@ -0,0 +1,22 @@ +// RUN: clang-cc %s -emit-llvm -o - +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() { } \ No newline at end of file -- cgit v1.2.3