blob: 3ecb19c29572cd415bc6ff36082409eb3940806f [file] [log] [blame]
Alexis Hunt94f9cbf2011-05-13 01:01:05 +00001// Without PCH
Richard Smith9ca5c422011-10-13 22:29:44 +00002// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify -include %s %s
Alexis Hunt94f9cbf2011-05-13 01:01:05 +00003// With PCH
Richard Smith9ca5c422011-10-13 22:29:44 +00004// 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 Hunt94f9cbf2011-05-13 01:01:05 +00006
7#ifndef PASS1
8#define PASS1
9
10struct foo {
11 foo() = default;
12 void bar() = delete; // expected-note{{deleted here}}
13};
14
15#else
16
Alexis Hunt119c10e2011-05-25 23:16:36 +000017foo::foo() { } // expected-error{{definition of explicitly defaulted default constructor}}
Alexis Hunt94f9cbf2011-05-13 01:01:05 +000018foo f;
19void fn() {
20 f.bar(); // expected-error{{deleted function}}
21}
22
23#endif