r351268 - NFC: Replace iterator loop with cxx_range_for
Stephen Kelly via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 15 14:45:46 PST 2019
Author: steveire
Date: Tue Jan 15 14:45:46 2019
New Revision: 351268
URL: http://llvm.org/viewvc/llvm-project?rev=351268&view=rev
Log:
NFC: Replace iterator loop with cxx_range_for
Modified:
cfe/trunk/lib/AST/ASTDumper.cpp
Modified: cfe/trunk/lib/AST/ASTDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTDumper.cpp?rev=351268&r1=351267&r2=351268&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTDumper.cpp (original)
+++ cfe/trunk/lib/AST/ASTDumper.cpp Tue Jan 15 14:45:46 2019
@@ -623,10 +623,8 @@ void ASTDumper::VisitFunctionDecl(const
dumpDecl(Parameter);
if (const CXXConstructorDecl *C = dyn_cast<CXXConstructorDecl>(D))
- for (CXXConstructorDecl::init_const_iterator I = C->init_begin(),
- E = C->init_end();
- I != E; ++I)
- dumpCXXCtorInitializer(*I);
+ for (const auto *I : C->inits())
+ dumpCXXCtorInitializer(I);
if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(D)) {
if (MD->size_overridden_methods() != 0) {
More information about the cfe-commits
mailing list