diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-09-02 23:58:38 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-09-02 23:58:38 +0000 |
commit | 2700dcde044893642b9b77638e052aa90be7cd51 (patch) | |
tree | f086906ac2f293ac1632f662e982b5204cd322c0 /lib/Sema/SemaCXXScopeSpec.cpp | |
parent | dd9967a6374c9a44be4af02aaeee340ffb82848f (diff) |
Add a wicked little test-case that illustrates what we have to deal
with to properly support member access expressions in templates. This
test is XFAIL'd, because we get it completely wrong, but I've made the
minimal changes to the representation to at least avoid a crash.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80856 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaCXXScopeSpec.cpp')
-rw-r--r-- | lib/Sema/SemaCXXScopeSpec.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Sema/SemaCXXScopeSpec.cpp b/lib/Sema/SemaCXXScopeSpec.cpp index 251ffea925..352e553edb 100644 --- a/lib/Sema/SemaCXXScopeSpec.cpp +++ b/lib/Sema/SemaCXXScopeSpec.cpp @@ -357,7 +357,8 @@ Sema::CXXScopeTy *Sema::ActOnCXXNestedNameSpecifier(Scope *S, // unqualified name lookup in the given scope. // FIXME: When we're instantiating a template, do we actually have to - // look in the scope of the template? Seems fishy... + // look in the scope of the template? Both EDG and GCC do it; GCC + // requires the lookup to be successful, EDG doesn't. Found = LookupName(S, &II, LookupNestedNameSpecifierName); ObjectTypeSearchedInScope = true; } @@ -366,6 +367,9 @@ Sema::CXXScopeTy *Sema::ActOnCXXNestedNameSpecifier(Scope *S, // base object type or prior nested-name-specifier, so this // nested-name-specifier refers to an unknown specialization. Just build // a dependent nested-name-specifier. + if (!Prefix) + return NestedNameSpecifier::Create(Context, &II); + return NestedNameSpecifier::Create(Context, Prefix, &II); } else { // Perform unqualified name lookup in the current scope. |