diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2014-03-07 15:12:56 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2014-03-07 15:12:56 +0000 |
commit | f6bf62e2d0a08d05a6029d629e2164c8c1e8f655 (patch) | |
tree | 42f5a5e505e19c5c0c1b1edc75e46f0ca4391d99 /clang/lib/AST/ASTContext.cpp | |
parent | 65fe9377f08448d12c04a9fcdbd0d49fd6807ecd (diff) | |
download | bcm5719-llvm-f6bf62e2d0a08d05a6029d629e2164c8c1e8f655.tar.gz bcm5719-llvm-f6bf62e2d0a08d05a6029d629e2164c8c1e8f655.zip |
[C++11] Replacing FunctionDecl 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: 203248
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r-- | clang/lib/AST/ASTContext.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index d94fa4ba36f..8df2eaec966 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -4850,9 +4850,8 @@ bool ASTContext::getObjCEncodingForFunctionDecl(const FunctionDecl *Decl, getObjCEncodingForType(Decl->getReturnType(), S); CharUnits ParmOffset; // Compute size of all parameters. - for (FunctionDecl::param_const_iterator PI = Decl->param_begin(), - E = Decl->param_end(); PI != E; ++PI) { - QualType PType = (*PI)->getType(); + for (auto PI : Decl->params()) { + QualType PType = PI->getType(); CharUnits sz = getObjCEncodingTypeSize(PType); if (sz.isZero()) continue; @@ -4865,9 +4864,7 @@ bool ASTContext::getObjCEncodingForFunctionDecl(const FunctionDecl *Decl, ParmOffset = CharUnits::Zero(); // Argument types. - for (FunctionDecl::param_const_iterator PI = Decl->param_begin(), - E = Decl->param_end(); PI != E; ++PI) { - ParmVarDecl *PVDecl = *PI; + for (auto PVDecl : Decl->params()) { QualType PType = PVDecl->getOriginalType(); if (const ArrayType *AT = dyn_cast<ArrayType>(PType->getCanonicalTypeInternal())) { |