diff options
Diffstat (limited to 'clang/lib/AST')
| -rw-r--r-- | clang/lib/AST/ExprConstant.cpp | 5 | ||||
| -rw-r--r-- | clang/lib/AST/StmtPrinter.cpp | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index 4c98c00474e..9c69080652b 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -3341,9 +3341,8 @@ static EvalStmtResult EvaluateStmt(APValue &Result, EvalInfo &Info, BlockScopeRAII Scope(Info); const CompoundStmt *CS = cast<CompoundStmt>(S); - for (CompoundStmt::const_body_iterator BI = CS->body_begin(), - BE = CS->body_end(); BI != BE; ++BI) { - EvalStmtResult ESR = EvaluateStmt(Result, Info, *BI, Case); + for (const auto *BI : CS->body()) { + EvalStmtResult ESR = EvaluateStmt(Result, Info, BI, Case); if (ESR == ESR_Succeeded) Case = 0; else if (ESR != ESR_CaseNotFound) diff --git a/clang/lib/AST/StmtPrinter.cpp b/clang/lib/AST/StmtPrinter.cpp index 625ab1624a7..a1dec268d55 100644 --- a/clang/lib/AST/StmtPrinter.cpp +++ b/clang/lib/AST/StmtPrinter.cpp @@ -114,9 +114,8 @@ namespace { /// with no newline after the }. void StmtPrinter::PrintRawCompoundStmt(CompoundStmt *Node) { OS << "{\n"; - for (CompoundStmt::body_iterator I = Node->body_begin(), E = Node->body_end(); - I != E; ++I) - PrintStmt(*I); + for (auto *I : Node->body()) + PrintStmt(I); Indent() << "}"; } |

