summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-03-27 06:55:49 +0000
committerJohn McCall <rjmccall@apple.com>2010-03-27 06:55:49 +0000
commit3dc81f77f6c174f90eb5e3a68a0de0e4ada7335a (patch)
treee7437fc4e207a93eba29cc3d168154b9b68184b2 /clang/test
parent2f88d7d72c006d78810212dce53101331efab44a (diff)
downloadbcm5719-llvm-3dc81f77f6c174f90eb5e3a68a0de0e4ada7335a.tar.gz
bcm5719-llvm-3dc81f77f6c174f90eb5e3a68a0de0e4ada7335a.zip
Accumulate all functions and classes that the effective context is
nested within, and suddenly local classes start working. Wouldn't be necessary if I hadn't used local classes in Clang in the first place. Or, well, wouldn't be necessary yet. :) llvm-svn: 99709
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CXX/class.access/p4.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/CXX/class.access/p4.cpp b/clang/test/CXX/class.access/p4.cpp
index 4da9eef25dd..0ef6e3abfb2 100644
--- a/clang/test/CXX/class.access/p4.cpp
+++ b/clang/test/CXX/class.access/p4.cpp
@@ -295,3 +295,17 @@ namespace test11 {
B::~B() {};
}
+
+namespace test12 {
+ class A {
+ int x;
+
+ void foo() {
+ class Local {
+ int foo(A *a) {
+ return a->x;
+ }
+ };
+ }
+ };
+}
OpenPOWER on IntegriCloud