From 43b68bebe708fee758a3c93534118c853bb1b230 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Fri, 7 Mar 2014 17:50:17 +0000 Subject: [C++11] Replacing ObjCMethodDecl iterators param_begin() and param_end() with iterator_range params(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203255 --- clang/lib/CodeGen/CGObjCMac.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'clang/lib/CodeGen/CGObjCMac.cpp') diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp index bd7c8bf6e72..257a029af26 100644 --- a/clang/lib/CodeGen/CGObjCMac.cpp +++ b/clang/lib/CodeGen/CGObjCMac.cpp @@ -1911,9 +1911,7 @@ CGObjCCommonMac::EmitMessageSend(CodeGen::CodeGenFunction &CGF, bool requiresnullCheck = false; if (CGM.getLangOpts().ObjCAutoRefCount && Method) - for (ObjCMethodDecl::param_const_iterator i = Method->param_begin(), - e = Method->param_end(); i != e; ++i) { - const ParmVarDecl *ParamDecl = (*i); + for (const auto *ParamDecl : Method->params()) { if (ParamDecl->hasAttr()) { if (!nullReturn.NullBB) nullReturn.init(CGF, Arg0); @@ -6602,9 +6600,7 @@ CGObjCNonFragileABIMac::EmitVTableMessageSend(CodeGenFunction &CGF, bool requiresnullCheck = false; if (CGM.getLangOpts().ObjCAutoRefCount && method) - for (ObjCMethodDecl::param_const_iterator i = method->param_begin(), - e = method->param_end(); i != e; ++i) { - const ParmVarDecl *ParamDecl = (*i); + for (const auto *ParamDecl : method->params()) { if (ParamDecl->hasAttr()) { if (!nullReturn.NullBB) nullReturn.init(CGF, arg0); -- cgit v1.2.3