blob: 27b915e95965d7e586c6ebce4111c568ca205064 [file] [log] [blame]
David Blaikie631a4862012-03-10 23:40:02 +00001// RUN: %clang_cc1 -emit-llvm-only %s
2
3// this used to crash due to templ<int>'s dtor not being marked as used by the
4// new expression in func()
5struct non_trivial {
6 non_trivial() {}
7 ~non_trivial() {}
8};
9template < typename T > class templ {
10 non_trivial n;
11};
12void func() {
13 new templ<int>[1][1];
14}