diff options
author | dim <dim@FreeBSD.org> | 2011-06-12 15:46:16 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-06-12 15:46:16 +0000 |
commit | c49018d9cce52d8c9f34b44865ec3ba8e89a1488 (patch) | |
tree | c5e9e10bc189de0058aa763c47b9920a8351b7df /test/SemaTemplate/deduction-crash.cpp | |
parent | 110eaaceddcec790f7e6a5e3bf1261c9aa1e73ab (diff) | |
download | FreeBSD-src-c49018d9cce52d8c9f34b44865ec3ba8e89a1488.zip FreeBSD-src-c49018d9cce52d8c9f34b44865ec3ba8e89a1488.tar.gz |
Vendor import of clang trunk r132879:
http://llvm.org/svn/llvm-project/cfe/trunk@132879
Diffstat (limited to 'test/SemaTemplate/deduction-crash.cpp')
-rw-r--r-- | test/SemaTemplate/deduction-crash.cpp | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/test/SemaTemplate/deduction-crash.cpp b/test/SemaTemplate/deduction-crash.cpp index ec97311..fb23eda 100644 --- a/test/SemaTemplate/deduction-crash.cpp +++ b/test/SemaTemplate/deduction-crash.cpp @@ -1,10 +1,10 @@ // RUN: %clang_cc1 -fsyntax-only %s 2>&1| FileCheck %s -// PR7511 - // Note that the error count below doesn't matter. We just want to // make sure that the parser doesn't crash. -// CHECK: 13 errors +// CHECK: 14 errors + +// PR7511 template<a> struct int_; @@ -57,3 +57,33 @@ int a() state_machine<int> p; p.ant(0); } + +// PR9974 +template <int> struct enable_if; +template <class > struct remove_reference ; +template <class _Tp> struct remove_reference<_Tp&> ; + +template <class > struct __tuple_like; + +template <class _Tp, class _Up, int = __tuple_like<typename remove_reference<_Tp>::type>::value> +struct __tuple_convertible; + +struct pair +{ +template<class _Tuple, int = enable_if<__tuple_convertible<_Tuple, pair>::value>::type> +pair(_Tuple&& ); +}; + +template <class> struct basic_ostream; + +template <int> +void endl( ) ; + +extern basic_ostream<char> cout; + +int operator<<( basic_ostream<char> , pair ) ; + +void register_object_imp ( ) +{ +cout << endl<1>; +} |