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 | 27d807cc9cdf17d88339afd7ee7b7a6d31717dbb (patch) | |
| tree | 6e58866a33517ac11f4bb462bd19028aa515b5af /clang/test/SemaTemplate/dependent-names.cpp | |
| parent | 93b2cba03b8fefa498d73a204e154716dbc5b9b3 (diff) | |
| download | bcm5719-llvm-27d807cc9cdf17d88339afd7ee7b7a6d31717dbb.tar.gz bcm5719-llvm-27d807cc9cdf17d88339afd7ee7b7a6d31717dbb.zip | |
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.
llvm-svn: 180789
Diffstat (limited to 'clang/test/SemaTemplate/dependent-names.cpp')
| -rw-r--r-- | clang/test/SemaTemplate/dependent-names.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/clang/test/SemaTemplate/dependent-names.cpp b/clang/test/SemaTemplate/dependent-names.cpp index eb75e69ef4d..fa47ef53581 100644 --- a/clang/test/SemaTemplate/dependent-names.cpp +++ b/clang/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() { |

