summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaCXX/nested-name-spec.cpp16
-rw-r--r--clang/test/SemaTemplate/nested-name-spec-template.cpp7
2 files changed, 23 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/nested-name-spec.cpp b/clang/test/SemaCXX/nested-name-spec.cpp
index 59a8e8c45dc..0dc1097e386 100644
--- a/clang/test/SemaCXX/nested-name-spec.cpp
+++ b/clang/test/SemaCXX/nested-name-spec.cpp
@@ -228,3 +228,19 @@ namespace test3 {
A::execute(path); // expected-error {{incomplete type 'test3::A' named in nested name specifier}}
}
}
+
+namespace PR7133 {
+ namespace A {
+ class Foo;
+ }
+
+ namespace A {
+ namespace B {
+ bool foo(Foo &);
+ }
+ }
+
+ bool A::B::foo(Foo &) {
+ return false;
+ }
+}
diff --git a/clang/test/SemaTemplate/nested-name-spec-template.cpp b/clang/test/SemaTemplate/nested-name-spec-template.cpp
index 9d25a051e8a..54e615b4ab6 100644
--- a/clang/test/SemaTemplate/nested-name-spec-template.cpp
+++ b/clang/test/SemaTemplate/nested-name-spec-template.cpp
@@ -64,3 +64,10 @@ namespace test1 {
template <class T>
T pair<T>::* const pair<T>::mem_array[2] = { &pair<T>::x, &pair<T>::y };
}
+
+typedef int T;
+namespace N1 {
+ template<typename T> T f0();
+}
+
+template<typename T> T N1::f0() { }
OpenPOWER on IntegriCloud