Alexis Hunt | 94f9cbf | 2011-05-13 01:01:05 +0000 | [diff] [blame] | 1 | // Without PCH |
Richard Smith | 9ca5c42 | 2011-10-13 22:29:44 +0000 | [diff] [blame^] | 2 | // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify -include %s %s |
Alexis Hunt | 94f9cbf | 2011-05-13 01:01:05 +0000 | [diff] [blame] | 3 | // With PCH |
Richard Smith | 9ca5c42 | 2011-10-13 22:29:44 +0000 | [diff] [blame^] | 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 |
Alexis Hunt | 94f9cbf | 2011-05-13 01:01:05 +0000 | [diff] [blame] | 6 | |
| 7 | #ifndef PASS1 |
| 8 | #define PASS1 |
| 9 | |
| 10 | struct foo { |
| 11 | foo() = default; |
| 12 | void bar() = delete; // expected-note{{deleted here}} |
| 13 | }; |
| 14 | |
| 15 | #else |
| 16 | |
Alexis Hunt | 119c10e | 2011-05-25 23:16:36 +0000 | [diff] [blame] | 17 | foo::foo() { } // expected-error{{definition of explicitly defaulted default constructor}} |
Alexis Hunt | 94f9cbf | 2011-05-13 01:01:05 +0000 | [diff] [blame] | 18 | foo f; |
| 19 | void fn() { |
| 20 | f.bar(); // expected-error{{deleted function}} |
| 21 | } |
| 22 | |
| 23 | #endif |