ArrayRef-ize ASTContext::getFunctionType and Sema::BuildFunctionType.

No (intended) functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176726 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/TreeTransform.h b/lib/Sema/TreeTransform.h
index c2dcf74..af82aba 100644
--- a/lib/Sema/TreeTransform.h
+++ b/lib/Sema/TreeTransform.h
@@ -713,8 +713,7 @@
   /// By default, performs semantic analysis when building the function type.
   /// Subclasses may override this routine to provide different behavior.
   QualType RebuildFunctionProtoType(QualType T,
-                                    QualType *ParamTypes,
-                                    unsigned NumParamTypes,
+                                    llvm::MutableArrayRef<QualType> ParamTypes,
                                     bool Variadic, bool HasTrailingReturn,
                                     unsigned Quals,
                                     RefQualifierKind RefQualifier,
@@ -4266,9 +4265,7 @@
       ResultType != T->getResultType() ||
       T->getNumArgs() != ParamTypes.size() ||
       !std::equal(T->arg_type_begin(), T->arg_type_end(), ParamTypes.begin())) {
-    Result = getDerived().RebuildFunctionProtoType(ResultType,
-                                                   ParamTypes.data(),
-                                                   ParamTypes.size(),
+    Result = getDerived().RebuildFunctionProtoType(ResultType, ParamTypes,
                                                    T->isVariadic(),
                                                    T->hasTrailingReturn(),
                                                    T->getTypeQuals(),
@@ -8850,13 +8847,11 @@
     return ExprError();
   }
 
-  QualType functionType = getDerived().RebuildFunctionProtoType(
-                                                        exprResultType,
-                                                        paramTypes.data(),
-                                                        paramTypes.size(),
-                                                        oldBlock->isVariadic(),
-                                                        false, 0, RQ_None,
-                                               exprFunctionType->getExtInfo());
+  QualType functionType =
+    getDerived().RebuildFunctionProtoType(exprResultType, paramTypes,
+                                          oldBlock->isVariadic(),
+                                          false, 0, RQ_None,
+                                          exprFunctionType->getExtInfo());
   blockScope->FunctionType = functionType;
 
   // Set the parameters on the block decl.
@@ -9072,15 +9067,15 @@
 }
 
 template<typename Derived>
-QualType TreeTransform<Derived>::RebuildFunctionProtoType(QualType T,
-                                                          QualType *ParamTypes,
-                                                        unsigned NumParamTypes,
-                                                          bool Variadic,
-                                                         bool HasTrailingReturn,
-                                                          unsigned Quals,
-                                                  RefQualifierKind RefQualifier,
-                                            const FunctionType::ExtInfo &Info) {
-  return SemaRef.BuildFunctionType(T, ParamTypes, NumParamTypes, Variadic,
+QualType TreeTransform<Derived>::RebuildFunctionProtoType(
+    QualType T,
+    llvm::MutableArrayRef<QualType> ParamTypes,
+    bool Variadic,
+    bool HasTrailingReturn,
+    unsigned Quals,
+    RefQualifierKind RefQualifier,
+    const FunctionType::ExtInfo &Info) {
+  return SemaRef.BuildFunctionType(T, ParamTypes, Variadic,
                                    HasTrailingReturn, Quals, RefQualifier,
                                    getDerived().getBaseLocation(),
                                    getDerived().getBaseEntity(),