[OpenMP][NFC] Remove unnecessary argument

This commit is contained in:
Johannes Doerfert 2020-03-29 15:55:52 -05:00
parent 7db64e202f
commit ceed44adfd
3 changed files with 9 additions and 10 deletions

View File

@ -9892,7 +9892,7 @@ public:
/// specialization via the OpenMP declare variant mechanism available. If
/// there is, return the specialized call expression, otherwise return the
/// original \p Call.
ExprResult ActOnOpenMPCall(Sema &S, ExprResult Call, Scope *Scope,
ExprResult ActOnOpenMPCall(ExprResult Call, Scope *Scope,
SourceLocation LParenLoc, MultiExprArg ArgExprs,
SourceLocation RParenLoc, Expr *ExecConfig);

View File

@ -5997,7 +5997,7 @@ ExprResult Sema::ActOnCallExpr(Scope *Scope, Expr *Fn, SourceLocation LParenLoc,
}
if (LangOpts.OpenMP)
Call = ActOnOpenMPCall(*this, Call, Scope, LParenLoc, ArgExprs, RParenLoc,
Call = ActOnOpenMPCall(Call, Scope, LParenLoc, ArgExprs, RParenLoc,
ExecConfig);
return Call;

View File

@ -5584,7 +5584,7 @@ void Sema::ActOnFinishedFunctionDefinitionInOpenMPDeclareVariantScope(
BaseFD->setImplicit(true);
}
ExprResult Sema::ActOnOpenMPCall(Sema &S, ExprResult Call, Scope *Scope,
ExprResult Sema::ActOnOpenMPCall(ExprResult Call, Scope *Scope,
SourceLocation LParenLoc,
MultiExprArg ArgExprs,
SourceLocation RParenLoc, Expr *ExecConfig) {
@ -5601,8 +5601,8 @@ ExprResult Sema::ActOnOpenMPCall(Sema &S, ExprResult Call, Scope *Scope,
if (!CalleeFnDecl->hasAttr<OMPDeclareVariantAttr>())
return Call;
ASTContext &Context = S.getASTContext();
OMPContext OMPCtx(S.getLangOpts().OpenMPIsDevice,
ASTContext &Context = getASTContext();
OMPContext OMPCtx(getLangOpts().OpenMPIsDevice,
Context.getTargetInfo().getTriple());
SmallVector<Expr *, 4> Exprs;
@ -5650,12 +5650,12 @@ ExprResult Sema::ActOnOpenMPCall(Sema &S, ExprResult Call, Scope *Scope,
if (auto *SpecializedMethod = dyn_cast<CXXMethodDecl>(BestDecl)) {
auto *MemberCall = dyn_cast<CXXMemberCallExpr>(CE);
BestExpr = MemberExpr::CreateImplicit(
S.Context, MemberCall->getImplicitObjectArgument(),
/* IsArrow */ false, SpecializedMethod, S.Context.BoundMemberTy,
Context, MemberCall->getImplicitObjectArgument(),
/* IsArrow */ false, SpecializedMethod, Context.BoundMemberTy,
MemberCall->getValueKind(), MemberCall->getObjectKind());
}
NewCall = S.BuildCallExpr(Scope, BestExpr, LParenLoc, ArgExprs, RParenLoc,
ExecConfig);
NewCall = BuildCallExpr(Scope, BestExpr, LParenLoc, ArgExprs, RParenLoc,
ExecConfig);
if (NewCall.isUsable())
break;
}
@ -5666,7 +5666,6 @@ ExprResult Sema::ActOnOpenMPCall(Sema &S, ExprResult Call, Scope *Scope,
if (!NewCall.isUsable())
return Call;
return PseudoObjectExpr::Create(Context, CE, {NewCall.get()}, 0);
}