@@ -5921,6 +5921,7 @@ void Sema::ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope(
5921
5921
continue;
5922
5922
5923
5923
QualType UDeclTy = UDecl->getType();
5924
+ // TODO: Verify types for templates eventually.
5924
5925
if (!UDeclTy->isDependentType()) {
5925
5926
QualType NewType = Context.mergeFunctionTypes(
5926
5927
FType, UDeclTy, /* OfBlockPointer */ false,
@@ -6008,8 +6009,6 @@ ExprResult Sema::ActOnOpenMPCall(ExprResult Call, Scope *Scope,
6008
6009
TargetOMPContext OMPCtx(Context, std::move(DiagUnknownTrait),
6009
6010
getCurFunctionDecl());
6010
6011
6011
- QualType CalleeFnType = CalleeFnDecl->getType();
6012
-
6013
6012
SmallVector<Expr *, 4> Exprs;
6014
6013
SmallVector<VariantMatchInfo, 4> VMIs;
6015
6014
while (CalleeFnDecl) {
@@ -6062,19 +6061,8 @@ ExprResult Sema::ActOnOpenMPCall(ExprResult Call, Scope *Scope,
6062
6061
}
6063
6062
NewCall = BuildCallExpr(Scope, BestExpr, LParenLoc, ArgExprs, RParenLoc,
6064
6063
ExecConfig);
6065
- if (NewCall.isUsable()) {
6066
- if (CallExpr *NCE = dyn_cast<CallExpr>(NewCall.get())) {
6067
- FunctionDecl *NewCalleeFnDecl = NCE->getDirectCallee();
6068
- QualType NewType = Context.mergeFunctionTypes(
6069
- CalleeFnType, NewCalleeFnDecl->getType(),
6070
- /* OfBlockPointer */ false,
6071
- /* Unqualified */ false, /* AllowCXX */ true);
6072
- if (!NewType.isNull())
6073
- break;
6074
- // Don't use the call if the function type was not compatible.
6075
- NewCall = nullptr;
6076
- }
6077
- }
6064
+ if (NewCall.isUsable())
6065
+ break;
6078
6066
}
6079
6067
6080
6068
VMIs.erase(VMIs.begin() + BestIdx);
0 commit comments