forked from OSchip/llvm-project
[OpenMP][NFC] Remove unnecessary argument
This commit is contained in:
parent
7db64e202f
commit
ceed44adfd
|
@ -9892,7 +9892,7 @@ public:
|
||||||
/// specialization via the OpenMP declare variant mechanism available. If
|
/// specialization via the OpenMP declare variant mechanism available. If
|
||||||
/// there is, return the specialized call expression, otherwise return the
|
/// there is, return the specialized call expression, otherwise return the
|
||||||
/// original \p Call.
|
/// original \p Call.
|
||||||
ExprResult ActOnOpenMPCall(Sema &S, ExprResult Call, Scope *Scope,
|
ExprResult ActOnOpenMPCall(ExprResult Call, Scope *Scope,
|
||||||
SourceLocation LParenLoc, MultiExprArg ArgExprs,
|
SourceLocation LParenLoc, MultiExprArg ArgExprs,
|
||||||
SourceLocation RParenLoc, Expr *ExecConfig);
|
SourceLocation RParenLoc, Expr *ExecConfig);
|
||||||
|
|
||||||
|
|
|
@ -5997,7 +5997,7 @@ ExprResult Sema::ActOnCallExpr(Scope *Scope, Expr *Fn, SourceLocation LParenLoc,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LangOpts.OpenMP)
|
if (LangOpts.OpenMP)
|
||||||
Call = ActOnOpenMPCall(*this, Call, Scope, LParenLoc, ArgExprs, RParenLoc,
|
Call = ActOnOpenMPCall(Call, Scope, LParenLoc, ArgExprs, RParenLoc,
|
||||||
ExecConfig);
|
ExecConfig);
|
||||||
|
|
||||||
return Call;
|
return Call;
|
||||||
|
|
|
@ -5584,7 +5584,7 @@ void Sema::ActOnFinishedFunctionDefinitionInOpenMPDeclareVariantScope(
|
||||||
BaseFD->setImplicit(true);
|
BaseFD->setImplicit(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
ExprResult Sema::ActOnOpenMPCall(Sema &S, ExprResult Call, Scope *Scope,
|
ExprResult Sema::ActOnOpenMPCall(ExprResult Call, Scope *Scope,
|
||||||
SourceLocation LParenLoc,
|
SourceLocation LParenLoc,
|
||||||
MultiExprArg ArgExprs,
|
MultiExprArg ArgExprs,
|
||||||
SourceLocation RParenLoc, Expr *ExecConfig) {
|
SourceLocation RParenLoc, Expr *ExecConfig) {
|
||||||
|
@ -5601,8 +5601,8 @@ ExprResult Sema::ActOnOpenMPCall(Sema &S, ExprResult Call, Scope *Scope,
|
||||||
if (!CalleeFnDecl->hasAttr<OMPDeclareVariantAttr>())
|
if (!CalleeFnDecl->hasAttr<OMPDeclareVariantAttr>())
|
||||||
return Call;
|
return Call;
|
||||||
|
|
||||||
ASTContext &Context = S.getASTContext();
|
ASTContext &Context = getASTContext();
|
||||||
OMPContext OMPCtx(S.getLangOpts().OpenMPIsDevice,
|
OMPContext OMPCtx(getLangOpts().OpenMPIsDevice,
|
||||||
Context.getTargetInfo().getTriple());
|
Context.getTargetInfo().getTriple());
|
||||||
|
|
||||||
SmallVector<Expr *, 4> Exprs;
|
SmallVector<Expr *, 4> Exprs;
|
||||||
|
@ -5650,12 +5650,12 @@ ExprResult Sema::ActOnOpenMPCall(Sema &S, ExprResult Call, Scope *Scope,
|
||||||
if (auto *SpecializedMethod = dyn_cast<CXXMethodDecl>(BestDecl)) {
|
if (auto *SpecializedMethod = dyn_cast<CXXMethodDecl>(BestDecl)) {
|
||||||
auto *MemberCall = dyn_cast<CXXMemberCallExpr>(CE);
|
auto *MemberCall = dyn_cast<CXXMemberCallExpr>(CE);
|
||||||
BestExpr = MemberExpr::CreateImplicit(
|
BestExpr = MemberExpr::CreateImplicit(
|
||||||
S.Context, MemberCall->getImplicitObjectArgument(),
|
Context, MemberCall->getImplicitObjectArgument(),
|
||||||
/* IsArrow */ false, SpecializedMethod, S.Context.BoundMemberTy,
|
/* IsArrow */ false, SpecializedMethod, Context.BoundMemberTy,
|
||||||
MemberCall->getValueKind(), MemberCall->getObjectKind());
|
MemberCall->getValueKind(), MemberCall->getObjectKind());
|
||||||
}
|
}
|
||||||
NewCall = S.BuildCallExpr(Scope, BestExpr, LParenLoc, ArgExprs, RParenLoc,
|
NewCall = BuildCallExpr(Scope, BestExpr, LParenLoc, ArgExprs, RParenLoc,
|
||||||
ExecConfig);
|
ExecConfig);
|
||||||
if (NewCall.isUsable())
|
if (NewCall.isUsable())
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -5666,7 +5666,6 @@ ExprResult Sema::ActOnOpenMPCall(Sema &S, ExprResult Call, Scope *Scope,
|
||||||
|
|
||||||
if (!NewCall.isUsable())
|
if (!NewCall.isUsable())
|
||||||
return Call;
|
return Call;
|
||||||
|
|
||||||
return PseudoObjectExpr::Create(Context, CE, {NewCall.get()}, 0);
|
return PseudoObjectExpr::Create(Context, CE, {NewCall.get()}, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue