2015-05-27 03:44:52 +08:00
|
|
|
// RUN: %clang_cc1 -triple i686-windows-gnu -fms-extensions -verify -std=c++03 %s
|
|
|
|
// RUN: %clang_cc1 -triple i686-windows-gnu -fms-extensions -verify -std=c++11 %s
|
|
|
|
// RUN: %clang_cc1 -triple i686-windows-msvc -fms-extensions -verify -std=c++03 -DERROR %s
|
|
|
|
// RUN: %clang_cc1 -triple i686-windows-msvc -fms-extensions -verify -std=c++11 %s
|
2015-02-20 06:39:24 +08:00
|
|
|
|
2015-02-21 09:07:24 +08:00
|
|
|
#ifndef ERROR
|
2015-02-20 06:39:24 +08:00
|
|
|
// expected-no-diagnostics
|
2015-02-21 09:07:24 +08:00
|
|
|
#endif
|
2015-02-20 06:39:24 +08:00
|
|
|
|
|
|
|
struct NonCopyable {
|
|
|
|
private:
|
2015-02-21 09:07:24 +08:00
|
|
|
#ifdef ERROR
|
|
|
|
// expected-note@+2{{declared private here}}
|
|
|
|
#endif
|
2015-02-20 06:39:24 +08:00
|
|
|
NonCopyable();
|
|
|
|
};
|
|
|
|
|
2015-02-21 09:07:24 +08:00
|
|
|
#ifdef ERROR
|
|
|
|
// expected-error@+4{{field of type 'NonCopyable' has private default constructor}}
|
|
|
|
// expected-note@+3{{implicit default constructor for 'S' first required here}}
|
|
|
|
// expected-note@+2{{due to 'S' being dllexported; try compiling in C++11 mode}}
|
|
|
|
#endif
|
2015-02-20 06:39:24 +08:00
|
|
|
struct __declspec(dllexport) S {
|
|
|
|
NonCopyable member;
|
|
|
|
};
|