summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/nested-name-spec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/nested-name-spec.cpp')
-rw-r--r--clang/test/SemaCXX/nested-name-spec.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/clang/test/SemaCXX/nested-name-spec.cpp b/clang/test/SemaCXX/nested-name-spec.cpp
index 223e6ff6689..dc8eda59942 100644
--- a/clang/test/SemaCXX/nested-name-spec.cpp
+++ b/clang/test/SemaCXX/nested-name-spec.cpp
@@ -191,6 +191,19 @@ foo<somens:a> a2; // expected-error {{unexpected ':' in nested name specifier}}
somens::a a3 = a2; // expected-error {{cannot initialize 'a3' with an lvalue of type 'foo<somens::a>'}}
+// typedefs and using declarations.
+namespace test1 {
+ namespace ns {
+ class Counter { static int count; };
+ typedef Counter counter;
+ }
+ using ns::counter;
-
-
+ class Test {
+ void test1() {
+ counter c;
+ c.count++;
+ counter::count++;
+ }
+ };
+}
OpenPOWER on IntegriCloud