aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/MinimalAction.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-09-02 22:59:36 +0000
committerDouglas Gregor <dgregor@apple.com>2009-09-02 22:59:36 +0000
commit2dd078ae50ff7be1fb25ebeedde45e9ab691a4f0 (patch)
tree0e30fbe6d5c2cbab6ad0dc64accd298ad7822f9f /lib/Parse/MinimalAction.cpp
parent6c35415912d1e43c21fcaa2823934ae993f2718b (diff)
Rewrite of our handling of name lookup in C++ member access expressions, e.g.,
x->Base::f We no longer try to "enter" the context of the type that "x" points to. Instead, we drag that object type through the parser and pass it into the Sema routines that need to know how to perform lookup within member access expressions. We now implement most of the crazy name lookup rules in C++ [basic.lookup.classref] for non-templated code, including performing lookup both in the context of the type referred to by the member access and in the scope of the member access itself and then detecting ambiguities when the two lookups collide (p1 and p4; p3 and p7 are still TODO). This change also corrects our handling of name lookup within template arguments of template-ids inside the nested-name-specifier (p6; we used to look into the scope of the object expression for them) and fixes PR4703. I have disabled some tests that involve member access expressions where the object expression has dependent type, because we don't yet have the ability to describe dependent nested-name-specifiers starting with an identifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80843 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/MinimalAction.cpp')
-rw-r--r--lib/Parse/MinimalAction.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Parse/MinimalAction.cpp b/lib/Parse/MinimalAction.cpp
index ee23c0038a..d89cc8c3ea 100644
--- a/lib/Parse/MinimalAction.cpp
+++ b/lib/Parse/MinimalAction.cpp
@@ -160,8 +160,11 @@ bool MinimalAction::isCurrentClassName(const IdentifierInfo &, Scope *,
}
TemplateNameKind
-MinimalAction::isTemplateName(const IdentifierInfo &II, Scope *S,
+MinimalAction::isTemplateName(Scope *S,
+ const IdentifierInfo &II,
+ SourceLocation IdLoc,
const CXXScopeSpec *SS,
+ TypeTy *ObjectType,
bool EnteringScope,
TemplateTy &TemplateDecl) {
return TNK_Non_template;