diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-04-30 13:56:41 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-04-30 13:56:41 +0000 |
commit | dc7a4f5d7a7e3b60d4dc4a80338d7a2728540998 (patch) | |
tree | 0fdbc7f2427ae39e5c561332fb0d7c04e4dcb65b /test/SemaTemplate | |
parent | 24cb36d9c212f82b3d9aedd34be27ae4911bfdba (diff) |
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
Diffstat (limited to 'test/SemaTemplate')
-rw-r--r-- | test/SemaTemplate/dependent-names.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
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<typename T> struct S { void f() { @@ -278,6 +278,25 @@ namespace PR10187 { } } + namespace A2 { + template<typename T> + struct S { + void f() { + for (auto &a : e) + __range(a); // expected-error {{undeclared identifier '__range'}} + } + T e[10]; + }; + void g() { + S<int>().f(); // expected-note {{here}} + } + struct X {}; + void __range(X); + void h() { + S<X>().f(); + } + } + namespace B { template<typename T> void g(); // expected-note {{not viable}} template<typename T> void f() { |