Home | History | Annotate | Download | only in PCH
      1 // Without PCH
      2 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify -include %s %s
      3 // With PCH
      4 // RUN: %clang_cc1 -x c++-header -std=c++11 -emit-pch -o %t %s
      5 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify -include-pch %t %s
      6 
      7 #ifndef PASS1
      8 #define PASS1
      9 
     10 struct foo {
     11   foo() = default;
     12   void bar() = delete;
     13 };
     14 
     15 struct baz {
     16   ~baz() = delete;
     17 };
     18 
     19 class quux {
     20   ~quux() = default;
     21 };
     22 
     23 #else
     24 
     25 foo::foo() { } // expected-error{{definition of explicitly defaulted default constructor}}
     26 foo f;
     27 void fn() {
     28   f.bar(); // expected-error{{deleted function}} expected-note@12{{deleted here}}
     29 }
     30 
     31 baz bz; // expected-error{{deleted function}} expected-note@16{{deleted here}}
     32 quux qx; // expected-error{{private destructor}} expected-note@20{{private here}}
     33 
     34 #endif
     35