aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/nested-name-spec.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-12-19 09:28:58 +0000
committerJohn McCall <rjmccall@apple.com>2009-12-19 09:28:58 +0000
commit731ad843b7bf1862f6547ac79539f0f5b4c539bd (patch)
tree97e3dae789dab6e85566c174aaa08aa02b818c44 /test/SemaCXX/nested-name-spec.cpp
parentcfdc81a83467973b14e4ea5e9e9af1690f135415 (diff)
Just push a new scope when parsing an out-of-line variable definition.
Magically fixes all the terrible lookup problems associated with not pushing a new scope. Resolves an ancient xfail and an LLVM misparse. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91769 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/nested-name-spec.cpp')
-rw-r--r--test/SemaCXX/nested-name-spec.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/SemaCXX/nested-name-spec.cpp b/test/SemaCXX/nested-name-spec.cpp
index 454af5ef19..4e65b41e66 100644
--- a/test/SemaCXX/nested-name-spec.cpp
+++ b/test/SemaCXX/nested-name-spec.cpp
@@ -207,3 +207,16 @@ namespace test1 {
}
};
}
+
+// We still need to do lookup in the lexical scope, even if we push a
+// non-lexical scope.
+namespace test2 {
+ namespace ns {
+ int *count_ptr;
+ }
+ namespace {
+ int count = 0;
+ }
+
+ int *ns::count_ptr = &count;
+}