diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 |
| commit | 45b533945f0851ec234ca846e1af5ee1e4df0b6e (patch) | |
| tree | 0a5b74c0b9ca73aded34df95c91fcaf3815230d8 /test/CXX/basic/basic.scope/basic.scope.hiding/p2.cpp | |
| parent | 7e86edd64bfae4e324224452e4ea879b3371a4bd (diff) | |
Notes
Diffstat (limited to 'test/CXX/basic/basic.scope/basic.scope.hiding/p2.cpp')
| -rw-r--r-- | test/CXX/basic/basic.scope/basic.scope.hiding/p2.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/CXX/basic/basic.scope/basic.scope.hiding/p2.cpp b/test/CXX/basic/basic.scope/basic.scope.hiding/p2.cpp index 1d2b525da4c2..bf8df1abee4e 100644 --- a/test/CXX/basic/basic.scope/basic.scope.hiding/p2.cpp +++ b/test/CXX/basic/basic.scope/basic.scope.hiding/p2.cpp @@ -1,4 +1,6 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s // rdar4641403 namespace N { @@ -34,7 +36,10 @@ namespace PR17731 { struct S c = b; } { - struct S { S() {} }; // expected-note {{candidate}} + struct S { S() {} }; // expected-note {{candidate constructor (the implicit copy constructor) not viable}} +#if __cplusplus >= 201103L // C++11 or later + // expected-note@-2 {{candidate constructor (the implicit move constructor) not viable}} +#endif int a = S(); // expected-error {{no viable conversion from 'S'}} struct S c = b; // expected-error {{no viable conversion from 'struct S'}} } @@ -50,7 +55,10 @@ namespace PR17731 { struct S c = b; } { - struct S { S() {} }; // expected-note {{candidate}} + struct S { S() {} }; // expected-note {{candidate constructor (the implicit copy constructor) not viable}} +#if __cplusplus >= 201103L // C++11 or later + // expected-note@-2 {{candidate constructor (the implicit move constructor) not viable}} +#endif int a = S(); // expected-error {{no viable conversion from 'S'}} struct S c = b; // expected-error {{no viable conversion from 'struct S'}} } |
