summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTDumper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/ASTDumper.cpp')
-rw-r--r--clang/lib/AST/ASTDumper.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/clang/lib/AST/ASTDumper.cpp b/clang/lib/AST/ASTDumper.cpp
index e1d52eaf0d9..fc206b05c14 100644
--- a/clang/lib/AST/ASTDumper.cpp
+++ b/clang/lib/AST/ASTDumper.cpp
@@ -1154,10 +1154,8 @@ void ASTDumper::VisitFunctionDecl(const FunctionDecl *D) {
if (!D->param_begin() && D->getNumParams())
dumpChild([=] { OS << "<<NULL params x " << D->getNumParams() << ">>"; });
else
- for (FunctionDecl::param_const_iterator I = D->param_begin(),
- E = D->param_end();
- I != E; ++I)
- dumpDecl(*I);
+ for (const ParmVarDecl *Parameter : D->parameters())
+ dumpDecl(Parameter);
if (const CXXConstructorDecl *C = dyn_cast<CXXConstructorDecl>(D))
for (CXXConstructorDecl::init_const_iterator I = C->init_begin(),
@@ -1548,10 +1546,8 @@ void ASTDumper::VisitObjCMethodDecl(const ObjCMethodDecl *D) {
if (D->isThisDeclarationADefinition()) {
dumpDeclContext(D);
} else {
- for (ObjCMethodDecl::param_const_iterator I = D->param_begin(),
- E = D->param_end();
- I != E; ++I)
- dumpDecl(*I);
+ for (const ParmVarDecl *Parameter : D->parameters())
+ dumpDecl(Parameter);
}
if (D->isVariadic())
OpenPOWER on IntegriCloud