diff options
Diffstat (limited to 'clang/test/SemaTemplate/instantiate-expr-4.cpp')
-rw-r--r-- | clang/test/SemaTemplate/instantiate-expr-4.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/instantiate-expr-4.cpp b/clang/test/SemaTemplate/instantiate-expr-4.cpp index d95ccfecd9b..9a1a1d2bb69 100644 --- a/clang/test/SemaTemplate/instantiate-expr-4.cpp +++ b/clang/test/SemaTemplate/instantiate-expr-4.cpp @@ -1,4 +1,6 @@ // RUN: %clang_cc1 -fcxx-exceptions -fexceptions -fsyntax-only -verify %s +// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -fsyntax-only -verify -std=c++98 %s +// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -fsyntax-only -verify -std=c++11 %s // --------------------------------------------------------------------- // C++ Functional Casts @@ -22,6 +24,9 @@ struct FunctionalCast0 { template struct FunctionalCast0<5>; struct X { // expected-note 3 {{candidate constructor (the implicit copy constructor)}} +#if __cplusplus >= 201103L +// expected-note@-2 3 {{candidate constructor (the implicit move constructor) not viable}} +#endif X(int, int); // expected-note 3 {{candidate constructor}} }; @@ -213,6 +218,10 @@ template<typename T, typename Val1> struct InitList1 { void f(Val1 val1) { T x = { val1 }; +#if __cplusplus >= 201103L + // expected-error@-2 {{type 'float' cannot be narrowed to 'int' in initializer list}} + // expected-note@-3 {{insert an explicit cast to silence this issue}} +#endif } }; @@ -222,6 +231,9 @@ struct APair { }; template struct InitList1<int[1], float>; +#if __cplusplus >= 201103L +// expected-note@-2 {{instantiation of member function}} +#endif template struct InitList1<APair, int*>; template<typename T, typename Val1, typename Val2> |