diff options
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 840a71461e..69e06ea88f 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -9485,8 +9485,7 @@ void Sema::ActOnBlockArguments(SourceLocation CaretLoc, Declarator &ParamInfo, FunctionProtoType::ExtProtoInfo EPI; EPI.HasTrailingReturn = false; EPI.TypeQuals |= DeclSpec::TQ_const; - T = Context.getFunctionType(Context.DependentTy, /*Args=*/0, /*NumArgs=*/0, - EPI); + T = Context.getFunctionType(Context.DependentTy, ArrayRef<QualType>(), EPI); Sig = Context.getTrivialTypeSourceInfo(T); } @@ -9665,7 +9664,7 @@ ExprResult Sema::ActOnBlockStmtExpr(SourceLocation CaretLoc, if (isa<FunctionNoProtoType>(FTy)) { FunctionProtoType::ExtProtoInfo EPI; EPI.ExtInfo = Ext; - BlockTy = Context.getFunctionType(RetTy, 0, 0, EPI); + BlockTy = Context.getFunctionType(RetTy, ArrayRef<QualType>(), EPI); // Otherwise, if we don't need to change anything about the function type, // preserve its sugar structure. @@ -9679,17 +9678,18 @@ ExprResult Sema::ActOnBlockStmtExpr(SourceLocation CaretLoc, FunctionProtoType::ExtProtoInfo EPI = FPT->getExtProtoInfo(); EPI.TypeQuals = 0; // FIXME: silently? EPI.ExtInfo = Ext; - BlockTy = Context.getFunctionType(RetTy, - FPT->arg_type_begin(), - FPT->getNumArgs(), - EPI); + BlockTy = + Context.getFunctionType(RetTy, + ArrayRef<QualType>(FPT->arg_type_begin(), + FPT->getNumArgs()), + EPI); } // If we don't have a function type, just build one from nothing. } else { FunctionProtoType::ExtProtoInfo EPI; EPI.ExtInfo = FunctionType::ExtInfo().withNoReturn(NoReturn); - BlockTy = Context.getFunctionType(RetTy, 0, 0, EPI); + BlockTy = Context.getFunctionType(RetTy, ArrayRef<QualType>(), EPI); } DiagnoseUnusedParameters(BSI->TheDecl->param_begin(), @@ -11845,10 +11845,11 @@ ExprResult RebuildUnknownAnyExpr::VisitCallExpr(CallExpr *E) { // Rebuild the function type, replacing the result type with DestType. if (const FunctionProtoType *Proto = dyn_cast<FunctionProtoType>(FnType)) - DestType = S.Context.getFunctionType(DestType, - Proto->arg_type_begin(), - Proto->getNumArgs(), - Proto->getExtProtoInfo()); + DestType = + S.Context.getFunctionType(DestType, + ArrayRef<QualType>(Proto->arg_type_begin(), + Proto->getNumArgs()), + Proto->getExtProtoInfo()); else DestType = S.Context.getFunctionNoProtoType(DestType, FnType->getExtInfo()); |