summaryrefslogtreecommitdiffstats
path: root/test/SemaTemplate/dependent-names.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaTemplate/dependent-names.cpp')
-rw-r--r--test/SemaTemplate/dependent-names.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/test/SemaTemplate/dependent-names.cpp b/test/SemaTemplate/dependent-names.cpp
index eb75e69..fa47ef5 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() {
OpenPOWER on IntegriCloud