diff options
author | Jordan Rose <jordan_rose@apple.com> | 2013-03-08 21:51:21 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2013-03-08 21:51:21 +0000 |
commit | bea522ff43a3f11c7a2bc7949119dbb9fce19e39 (patch) | |
tree | 7e720ef716401a1b50dda348b13a9b8a108e1200 /lib/Sema/SemaExceptionSpec.cpp | |
parent | 303b96f255d61ae3dff913d777d3f40332786257 (diff) |
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
Diffstat (limited to 'lib/Sema/SemaExceptionSpec.cpp')
-rw-r--r-- | lib/Sema/SemaExceptionSpec.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/Sema/SemaExceptionSpec.cpp b/lib/Sema/SemaExceptionSpec.cpp index 29ce7dbb22..ab8dcd1ad4 100644 --- a/lib/Sema/SemaExceptionSpec.cpp +++ b/lib/Sema/SemaExceptionSpec.cpp @@ -203,10 +203,11 @@ bool Sema::CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New) { Old->isExternC()) { FunctionProtoType::ExtProtoInfo EPI = NewProto->getExtProtoInfo(); EPI.ExceptionSpecType = EST_DynamicNone; - QualType NewType = Context.getFunctionType(NewProto->getResultType(), - NewProto->arg_type_begin(), - NewProto->getNumArgs(), - EPI); + QualType NewType = + Context.getFunctionType(NewProto->getResultType(), + ArrayRef<QualType>(NewProto->arg_type_begin(), + NewProto->getNumArgs()), + EPI); New->setType(NewType); return false; } @@ -227,10 +228,11 @@ bool Sema::CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New) { // Update the type of the function with the appropriate exception // specification. - QualType NewType = Context.getFunctionType(NewProto->getResultType(), - NewProto->arg_type_begin(), - NewProto->getNumArgs(), - EPI); + QualType NewType = + Context.getFunctionType(NewProto->getResultType(), + ArrayRef<QualType>(NewProto->arg_type_begin(), + NewProto->getNumArgs()), + EPI); New->setType(NewType); // If exceptions are disabled, suppress the warning about missing |