Home | History | Annotate | Download | only in expr.new
      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 {
      6   non_trivial() {}
      7   ~non_trivial() {}
      8 };
      9 template < typename T > class templ {
     10   non_trivial n;
     11 };
     12 void func() {
     13   new templ<int>[1][1];
     14 }
     15