summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-09-03 16:14:30 +0000
committerDouglas Gregor <dgregor@apple.com>2009-09-03 16:14:30 +0000
commitc26e0f626b979f01869372a3a0b92d4d9ce5e625 (patch)
tree4059a60a749d177d2a67240655818104970f79bd /clang/test
parenta7326b5ba55d00b9da9b25421024182f2d6416bb (diff)
downloadbcm5719-llvm-c26e0f626b979f01869372a3a0b92d4d9ce5e625.tar.gz
bcm5719-llvm-c26e0f626b979f01869372a3a0b92d4d9ce5e625.zip
Improved handling for dependent, qualified member access expressions, e.g.,
t->Base::f where t has a dependent type. We save the nested-name-specifier in the CXXUnresolvedMemberExpr then, during instantiation, substitute into the nested-name-specifier with the (transformed) object type of t, so that we get name lookup into the type of the object expression. Note that we do not yet retain information about name lookup into the lexical scope of the member access expression, so several regression tests are still disabled. llvm-svn: 80925
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaCXX/qual-id-test.cpp23
1 files changed, 10 insertions, 13 deletions
diff --git a/clang/test/SemaCXX/qual-id-test.cpp b/clang/test/SemaCXX/qual-id-test.cpp
index 10f1a47a9d4..9032d0e9560 100644
--- a/clang/test/SemaCXX/qual-id-test.cpp
+++ b/clang/test/SemaCXX/qual-id-test.cpp
@@ -103,25 +103,22 @@ namespace C
a.x();
a->foo();
-#if 0
- // FIXME: We need the notion of identifiers as dependent
- // nested-name-specifiers without a prefix for this code to work.
-
- // Things that work for the wrong reason
a.A::sub::x();
a.A::B::base::x();
a->A::member::foo();
- // Things that work, but shouldn't
- a.bad::x();
-
- // Things that fail, but shouldn't
- a.sub::x(); // xpected-error{{use of undeclared identifier 'sub'}}
- a.base::x(); // xpected-error{{use of undeclared identifier 'base'}}
+ a.bad::x(); // xpected-error{{direct or virtual}}
+ a.sub::x();
+ a.base::x();
a.B::base::x(); // xpected-error{{use of undeclared identifier 'B'}}
- a->member::foo(); // xpected-error{{use of undeclared identifier 'member'}}
-#endif
+ a->member::foo();
}
+
+ void test_fun5() {
+ // FIXME: Enable the following once we get the nested-name-specifier lookup
+ // right during template instantiation.
+ // fun5<A::sub>(); // xpected-note 2{{instantiation}}
+ }
}
// PR4703
OpenPOWER on IntegriCloud