From 3d5c1fa93facbd101c7571036c7efc3a6d5e409b Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 26 Oct 2011 06:15:36 +0000 Subject: UnresolvedMemberExprs need lvalue-to-rvalue conversions during template instantiations too. llvm-svn: 143016 --- clang/lib/Sema/TreeTransform.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'clang/lib') diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h index 59c132caccd..7fb2d35c706 100644 --- a/clang/lib/Sema/TreeTransform.h +++ b/clang/lib/Sema/TreeTransform.h @@ -2145,6 +2145,13 @@ public: CXXScopeSpec SS; SS.Adopt(QualifierLoc); + if (BaseE && IsArrow) { + ExprResult BaseResult = getSema().DefaultLvalueConversion(BaseE); + if (BaseResult.isInvalid()) + return ExprError(); + BaseE = BaseResult.take(); + } + return SemaRef.BuildMemberReferenceExpr(BaseE, BaseType, OperatorLoc, IsArrow, SS, FirstQualifierInScope, -- cgit v1.2.3