diff options
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}} }; |