blob: 42c61553a7c16d4cd62f3a704ecadd191a59a82b [file] [log] [blame]
Aaron Ballman674cf262015-05-26 19:44:52 +00001// RUN: %clang_cc1 -triple i686-windows-gnu -fms-extensions -verify -std=c++03 %s
2// RUN: %clang_cc1 -triple i686-windows-gnu -fms-extensions -verify -std=c++11 %s
3// RUN: %clang_cc1 -triple i686-windows-msvc -fms-extensions -verify -std=c++03 -DERROR %s
4// RUN: %clang_cc1 -triple i686-windows-msvc -fms-extensions -verify -std=c++11 %s
Hans Wennborg97cbed42015-02-19 22:39:24 +00005
Hans Wennborg58703732015-02-21 01:07:24 +00006#ifndef ERROR
Hans Wennborg97cbed42015-02-19 22:39:24 +00007// expected-no-diagnostics
Hans Wennborg58703732015-02-21 01:07:24 +00008#endif
Hans Wennborg97cbed42015-02-19 22:39:24 +00009
10struct NonCopyable {
11private:
Hans Wennborg58703732015-02-21 01:07:24 +000012#ifdef ERROR
13 // expected-note@+2{{declared private here}}
14#endif
Hans Wennborg97cbed42015-02-19 22:39:24 +000015 NonCopyable();
16};
17
Hans Wennborg58703732015-02-21 01:07:24 +000018#ifdef ERROR
19// expected-error@+4{{field of type 'NonCopyable' has private default constructor}}
20// expected-note@+3{{implicit default constructor for 'S' first required here}}
21// expected-note@+2{{due to 'S' being dllexported; try compiling in C++11 mode}}
22#endif
Hans Wennborg97cbed42015-02-19 22:39:24 +000023struct __declspec(dllexport) S {
24 NonCopyable member;
25};