diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-09-03 16:14:30 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-09-03 16:14:30 +0000 |
commit | a38c687ef5354678b9d76a7b29354159f2b83736 (patch) | |
tree | ffbe4e528040593d2e2e41d63b44108fb6630af0 /test/SemaCXX | |
parent | af08ddc8f1c53fed8d8d0ad82aa2a0bb7d654bd1 (diff) | |
download | clang-a38c687ef5354678b9d76a7b29354159f2b83736.tar.gz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80925 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX')
-rw-r--r-- | test/SemaCXX/qual-id-test.cpp | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/test/SemaCXX/qual-id-test.cpp b/test/SemaCXX/qual-id-test.cpp index 10f1a47a9d..9032d0e956 100644 --- a/test/SemaCXX/qual-id-test.cpp +++ b/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 |