Files
clang-p2996/clang/test/CXX/expr/expr.unary/expr.new/p17-crash.cpp
David Blaikie 631a486e6a Fix crash & accepts-invalid for array of arrays of user defined type.
Test case/other help by Richard Smith.
Code review by John McCall.

llvm-svn: 152519
2012-03-10 23:40:02 +00:00

15 lines
308 B
C++

// RUN: %clang_cc1 -emit-llvm-only %s
// this used to crash due to templ<int>'s dtor not being marked as used by the
// new expression in func()
struct non_trivial {
non_trivial() {}
~non_trivial() {}
};
template < typename T > class templ {
non_trivial n;
};
void func() {
new templ<int>[1][1];
}