diff options
author | Stephen Kelly <steveire@gmail.com> | 2019-01-15 23:05:11 +0000 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2019-01-15 23:05:11 +0000 |
commit | db47eebb0fa1a8c7bfcee6294aecd96478a841a8 (patch) | |
tree | 50618dfeb6a50569136ff39269681b3d82e3d0ca | |
parent | 47da22ef5135c4bcfc49bc3d8e13831d58b02ede (diff) |
NFC: Some cleanups that I missed in the previous commit
-rw-r--r-- | clang/lib/AST/ASTDumper.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/clang/lib/AST/ASTDumper.cpp b/clang/lib/AST/ASTDumper.cpp index f982b1fbe36..4dcd20e4f52 100644 --- a/clang/lib/AST/ASTDumper.cpp +++ b/clang/lib/AST/ASTDumper.cpp @@ -599,7 +599,7 @@ void ASTDumper::VisitFunctionDecl(const FunctionDecl *D) { if (D->isTrivial()) OS << " trivial"; - if (const FunctionProtoType *FPT = D->getType()->getAs<FunctionProtoType>()) { + if (const auto *FPT = D->getType()->getAs<FunctionProtoType>()) { FunctionProtoType::ExtProtoInfo EPI = FPT->getExtProtoInfo(); switch (EPI.ExceptionSpec.Type) { default: break; @@ -612,7 +612,7 @@ void ASTDumper::VisitFunctionDecl(const FunctionDecl *D) { } } - if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(D)) { + if (const auto *MD = dyn_cast<CXXMethodDecl>(D)) { if (MD->size_overridden_methods() != 0) { auto dumpOverride = [=](const CXXMethodDecl *D) { SplitQualType T_split = D->getType().split(); @@ -635,8 +635,7 @@ void ASTDumper::VisitFunctionDecl(const FunctionDecl *D) { } } - if (const FunctionTemplateSpecializationInfo *FTSI = - D->getTemplateSpecializationInfo()) + if (const auto *FTSI = D->getTemplateSpecializationInfo()) dumpTemplateArgumentList(*FTSI->TemplateArguments); if (!D->param_begin() && D->getNumParams()) @@ -645,11 +644,9 @@ void ASTDumper::VisitFunctionDecl(const FunctionDecl *D) { 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(), - E = C->init_end(); - I != E; ++I) - dumpCXXCtorInitializer(*I); + if (const auto *C = dyn_cast<CXXConstructorDecl>(D)) + for (const auto *I : C->inits()) + dumpCXXCtorInitializer(I); if (D->doesThisDeclarationHaveABody()) dumpStmt(D->getBody()); |