diff options
| author | Charles Li <charles_li@playstation.sony.com> | 2016-04-13 20:00:45 +0000 |
|---|---|---|
| committer | Charles Li <charles_li@playstation.sony.com> | 2016-04-13 20:00:45 +0000 |
| commit | 64a1a81e76b48ade6773887323476b2a6fb72c38 (patch) | |
| tree | 4a74019258a4996b2df26cdc201e6a8eb9d27e1a /clang/test/SemaTemplate/instantiate-expr-4.cpp | |
| parent | c0bef99bb03cbcef5e0700bfdbed6e82970c8416 (diff) | |
| download | bcm5719-llvm-64a1a81e76b48ade6773887323476b2a6fb72c38.tar.gz bcm5719-llvm-64a1a81e76b48ade6773887323476b2a6fb72c38.zip | |
Lit C++11 Compatibility Patch #7
13 tests have been updated for C++11 compatibility.
Differential Revision: http://reviews.llvm.org/D19068
llvm-svn: 266239
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> |

