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.lookup | |
| parent | 7e86edd64bfae4e324224452e4ea879b3371a4bd (diff) | |
Notes
Diffstat (limited to 'test/CXX/basic/basic.lookup')
| -rw-r--r-- | test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp | 5 | ||||
| -rw-r--r-- | test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp | 14 |
2 files changed, 17 insertions, 2 deletions
diff --git a/test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp b/test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp index 32dd75ad49a8..2292fc540c48 100644 --- a/test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp +++ b/test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.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 namespace A { class A { @@ -20,6 +22,9 @@ namespace D { namespace C { class C {}; // expected-note {{candidate constructor (the implicit copy constructor) not viable: no known conversion from 'B::B' to 'const C::C &' for 1st argument}} +#if __cplusplus >= 201103L // C++11 or later + // expected-note@-2 {{candidate constructor (the implicit move constructor) not viable: no known conversion from 'B::B' to 'C::C &&' for 1st argument}} +#endif void func(C); // expected-note {{'C::func' declared here}} \ // expected-note {{passing argument to parameter here}} C operator+(C,C); diff --git a/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp b/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp index 7918e9f861e4..ed6c6c0bccf1 100644 --- a/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp +++ b/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/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 namespace Ints { int zero = 0; // expected-note {{candidate found by name lookup is 'Ints::zero'}} @@ -31,7 +33,11 @@ void test() { } namespace Numbers { - struct Number { // expected-note 2 {{candidate}} + struct Number { // expected-note 2 {{candidate constructor (the implicit copy constructor) not viable}} +#if __cplusplus >= 201103L // C++11 or later + // expected-note@-2 2 {{candidate constructor (the implicit move constructor) not viable}} +#endif + explicit Number(double d) : d(d) {} double d; }; @@ -66,7 +72,11 @@ void test3() { namespace inline_ns { int x; // expected-note 2{{found}} - inline namespace A { // expected-warning {{C++11}} + inline namespace A { +#if __cplusplus <= 199711L // C++03 or earlier + // expected-warning@-2 {{inline namespaces are a C++11 feature}} +#endif + int x; // expected-note 2{{found}} int y; // expected-note 2{{found}} } |
