Tighten type-checking a bit to make it clearer how BuildCXXMemberCallExpr is used.

llvm-svn: 151783
This commit is contained in:
Eli Friedman 2012-03-01 01:30:04 +00:00
parent d256c21666
commit 2fb8512888
2 changed files with 4 additions and 3 deletions

View File

@ -3664,7 +3664,7 @@ public:
TypeSourceInfo *EncodedTypeInfo,
SourceLocation RParenLoc);
ExprResult BuildCXXMemberCallExpr(Expr *Exp, NamedDecl *FoundDecl,
CXXMethodDecl *Method,
CXXConversionDecl *Method,
bool HadMultipleCandidates);
ExprResult ParseObjCEncodeExpression(SourceLocation AtLoc,

View File

@ -2292,7 +2292,8 @@ static ExprResult BuildCXXCastArgument(Sema &S,
assert(!From->getType()->isPointerType() && "Arg can't have pointer type!");
// Create an implicit call expr that calls it.
ExprResult Result = S.BuildCXXMemberCallExpr(From, FoundDecl, Method,
CXXConversionDecl *Conv = cast<CXXConversionDecl>(Method);
ExprResult Result = S.BuildCXXMemberCallExpr(From, FoundDecl, Conv,
HadMultipleCandidates);
if (Result.isInvalid())
return ExprError();
@ -5086,7 +5087,7 @@ ExprResult Sema::ActOnPseudoDestructorExpr(Scope *S, Expr *Base,
}
ExprResult Sema::BuildCXXMemberCallExpr(Expr *E, NamedDecl *FoundDecl,
CXXMethodDecl *Method,
CXXConversionDecl *Method,
bool HadMultipleCandidates) {
ExprResult Exp = PerformObjectArgumentInitialization(E, /*Qualifier=*/0,
FoundDecl, Method);