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

17 lines
553 B
C++

// RUN: %clang_cc1 -fsyntax-only -verify %s
class ctor {
ctor(); // expected-note{{implicitly declared private here}}
};
class dtor {
~dtor(); // expected-note 3 {{implicitly declared private here}}
};
void test() {
new ctor[0]; // expected-error{{calling a private constructor of class 'ctor'}}
new dtor[0]; // expected-error{{calling a private destructor of class 'dtor'}}
new dtor[3]; // expected-error{{calling a private destructor of class 'dtor'}}
new dtor[3][3]; // expected-error{{calling a private destructor of class 'dtor'}}
}