Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CXX / expr / expr.unary / expr.new / p17.cpp
blob9ca2e3d84ee6323e47780f18c3a748b808a9d0b1
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 class ctor {
4 ctor(); // expected-note{{implicitly declared private here}}
5 };
7 class dtor {
8 ~dtor(); // expected-note 3 {{implicitly declared private here}}
9 };
11 void test() {
12 new ctor[0]; // expected-error{{calling a private constructor of class 'ctor'}}
13 new dtor[0]; // expected-error{{temporary of type 'dtor' has private destructor}}
14 new dtor[3]; // expected-error{{temporary of type 'dtor' has private destructor}}
15 new dtor[3][3]; // expected-error{{temporary of type 'dtor' has private destructor}}