From dc7a4f5d7a7e3b60d4dc4a80338d7a2728540998 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 30 Apr 2013 13:56:41 +0000 Subject: Don't treat a non-deduced 'auto' type as being type-dependent. Instead, there are now two distinct canonical 'AutoType's: one is the undeduced 'auto' placeholder type, and the other is a deduced-but-dependent type. All deduced-to-a-non-dependent-type cases are still non-canonical. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180789 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/SemaTemplate/dependent-names.cpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'test/SemaTemplate') diff --git a/test/SemaTemplate/dependent-names.cpp b/test/SemaTemplate/dependent-names.cpp index eb75e69ef4..fa47ef5358 100644 --- a/test/SemaTemplate/dependent-names.cpp +++ b/test/SemaTemplate/dependent-names.cpp @@ -264,7 +264,7 @@ namespace PR10053 { } namespace PR10187 { - namespace A { + namespace A1 { template struct S { void f() { @@ -278,6 +278,25 @@ namespace PR10187 { } } + namespace A2 { + template + struct S { + void f() { + for (auto &a : e) + __range(a); // expected-error {{undeclared identifier '__range'}} + } + T e[10]; + }; + void g() { + S().f(); // expected-note {{here}} + } + struct X {}; + void __range(X); + void h() { + S().f(); + } + } + namespace B { template void g(); // expected-note {{not viable}} template void f() { -- cgit v1.2.3-18-g5258