summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-12-18 10:40:03 +0000
committerJohn McCall <rjmccall@apple.com>2009-12-18 10:40:03 +0000
commitea305edd63da4b03f49df6e31fd35a8fd3b7c5a8 (patch)
tree8529afaf67fa9786e9eb0eea43e8877d20385993 /clang/test
parent86b9d75dc892f301561521a105bce06e0389dde9 (diff)
downloadbcm5719-llvm-ea305edd63da4b03f49df6e31fd35a8fd3b7c5a8.tar.gz
bcm5719-llvm-ea305edd63da4b03f49df6e31fd35a8fd3b7c5a8.zip
Pull Sema::isAcceptableLookupResult into SemaLookup. Extract the criteria into
different functions and pick the function at lookup initialization time. In theory we could actually divide the criteria functions into N different functions for the N cases, but it's so not worth it. Among other things, lets us invoke LookupQualifiedName without recomputing IDNS info every time. Do some refactoring in SemaDecl to avoid an awkward special case in LQN that was only necessary for redeclaration testing for anonymous structs/unions --- which could be done more efficiently with a scoped lookup anyway. llvm-svn: 91676
Diffstat (limited to 'clang/test')
-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