Home | History | Annotate | Download | only in expr.new
      1 // RUN: %clang_cc1 -fsyntax-only -verify %s
      2 
      3 class ctor {
      4   ctor(); // expected-note{{implicitly declared private here}}
      5 };
      6 
      7 class dtor {
      8   ~dtor(); // expected-note 3 {{implicitly declared private here}}
      9 };
     10 
     11 void test() {
     12   new ctor[0]; // expected-error{{calling a private constructor of class 'ctor'}}
     13   new dtor[0]; // expected-error{{calling a private destructor of class 'dtor'}}
     14   new dtor[3]; // expected-error{{calling a private destructor of class 'dtor'}}
     15   new dtor[3][3]; // expected-error{{calling a private destructor of class 'dtor'}}
     16 }
     17