From 01e56aecb77a96dcd93fa0e901b919f2e441981d Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Mon, 12 Apr 2010 20:54:26 +0000 Subject: Implement C++ [temp.local]p4, which specifies how we eliminate name-lookup ambiguities when there are multiple base classes that are all specializations of the same class template. This is part of a general cleanup for ambiguities in template-name lookup. Fixes PR6717. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101065 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaExpr.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/Sema/SemaExpr.cpp') diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index d6f135863d..84b4c75399 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -2454,7 +2454,8 @@ Sema::ActOnDependentMemberExpr(ExprArg Base, QualType BaseType, } } - assert(BaseType->isDependentType() || Name.isDependentName()); + assert(BaseType->isDependentType() || Name.isDependentName() || + isDependentScopeSpecifier(SS)); // Get the type being accessed in BaseType. If this is an arrow, the BaseExpr // must have pointer type, and the accessed type is the pointee. @@ -3200,7 +3201,8 @@ Sema::OwningExprResult Sema::ActOnMemberAccessExpr(Scope *S, ExprArg BaseArg, Expr *Base = BaseArg.takeAs(); OwningExprResult Result(*this); - if (Base->getType()->isDependentType() || Name.isDependentName()) { + if (Base->getType()->isDependentType() || Name.isDependentName() || + isDependentScopeSpecifier(SS)) { Result = ActOnDependentMemberExpr(ExprArg(*this, Base), Base->getType(), IsArrow, OpLoc, SS, FirstQualifierInScope, -- cgit v1.2.3-18-g5258