• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // 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()
5 struct non_trivial {
non_trivialnon_trivial6   non_trivial() {}
~non_trivialnon_trivial7   ~non_trivial() {}
8 };
9 template < typename T > class templ {
10   non_trivial n;
11 };
func()12 void func() {
13   new templ<int>[1][1];
14 }
15