diff options
author | dim <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 |
commit | 3176e97f130184ece0e1a21352c8124cc83ff24a (patch) | |
tree | 0a5b74c0b9ca73aded34df95c91fcaf3815230d8 /test/SemaTemplate/default-expr-arguments.cpp | |
parent | 1e9b8d38881c3213d1e67b0c47ab9b2c00721a5c (diff) | |
download | FreeBSD-src-3176e97f130184ece0e1a21352c8124cc83ff24a.zip FreeBSD-src-3176e97f130184ece0e1a21352c8124cc83ff24a.tar.gz |
Vendor import of clang trunk r256633:
https://llvm.org/svn/llvm-project/cfe/trunk@256633
Diffstat (limited to 'test/SemaTemplate/default-expr-arguments.cpp')
-rw-r--r-- | test/SemaTemplate/default-expr-arguments.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/SemaTemplate/default-expr-arguments.cpp b/test/SemaTemplate/default-expr-arguments.cpp index 14b072a..438f5b1 100644 --- a/test/SemaTemplate/default-expr-arguments.cpp +++ b/test/SemaTemplate/default-expr-arguments.cpp @@ -1,4 +1,7 @@ // 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 + template<typename T> class C { C(int a0 = 0); }; @@ -6,6 +9,9 @@ template<> C<char>::C(int a0); struct S { }; // expected-note 3 {{candidate constructor (the implicit copy constructor)}} +#if __cplusplus >= 201103L // C++11 or later +// expected-note@-2 3 {{candidate constructor (the implicit move constructor) not viable}} +#endif template<typename T> void f1(T a, T b = 10) { } // expected-error{{no viable conversion}} \ // expected-note{{passing argument to parameter 'b' here}} @@ -67,7 +73,10 @@ void test_x0(X0<int> xi) { xi.f(17); } -struct NotDefaultConstructible { // expected-note 2{{candidate}} +struct NotDefaultConstructible { // 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 NotDefaultConstructible(int); // expected-note 2{{candidate}} }; |