[clang] ceed44a - [OpenMP][NFC] Remove unnecessary argument
Johannes Doerfert via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 4 09:36:20 PDT 2020
Author: Johannes Doerfert
Date: 2020-04-04T11:34:58-05:00
New Revision: ceed44adfd1ae9d714eaa4f0e7fa5a1a149b4dc5
URL: https://github.com/llvm/llvm-project/commit/ceed44adfd1ae9d714eaa4f0e7fa5a1a149b4dc5
DIFF: https://github.com/llvm/llvm-project/commit/ceed44adfd1ae9d714eaa4f0e7fa5a1a149b4dc5.diff
LOG: [OpenMP][NFC] Remove unnecessary argument
Added:
Modified:
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaExpr.cpp
clang/lib/Sema/SemaOpenMP.cpp
Removed:
################################################################################
diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h
index 7c689c2a13e8..10e2d69f3d9e 100644
--- a/clang/include/clang/Sema/Sema.h
+++ b/clang/include/clang/Sema/Sema.h
@@ -9892,7 +9892,7 @@ class Sema final {
/// 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);
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 8d0e97c85771..b311aad84816 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -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;
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index f663b1d43659..cfaf981983c1 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -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);
}
More information about the cfe-commits
mailing list