From 36c49e3f258dced101949edabd72e9bc3f1dedc4 Mon Sep 17 00:00:00 2001 From: dim Date: Fri, 17 Sep 2010 15:54:40 +0000 Subject: Vendor import of clang r114020 (from the release_28 branch): http://llvm.org/svn/llvm-project/cfe/branches/release_28@114020 Approved by: rpaulo (mentor) --- test/SemaTemplate/temp_arg_template.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'test/SemaTemplate/temp_arg_template.cpp') diff --git a/test/SemaTemplate/temp_arg_template.cpp b/test/SemaTemplate/temp_arg_template.cpp index 6671225..944acac 100644 --- a/test/SemaTemplate/temp_arg_template.cpp +++ b/test/SemaTemplate/temp_arg_template.cpp @@ -33,3 +33,21 @@ A *a9; // expected-error{{must be a class template}} // FIXME: The code below is ill-formed, because of the evil digraph '<:'. // We should provide a much better error message than we currently do. // A<::N::Z> *a10; + +// PR7807 +namespace N { + template + struct X + { }; + + template + struct Y + { X const_ref(); }; + + template class TT, typename T, int N> + int operator<<(int, TT a) { // expected-note{{candidate template ignored}} + 0 << a.const_ref(); // expected-error{{invalid operands to binary expression ('int' and 'X')}} + } + + void f0( Y y){ 1 << y; } // expected-note{{in instantiation of function template specialization 'N::operator<<' requested here}} +} -- cgit v1.1