diff options
Diffstat (limited to 'clang/lib/Sema/JumpDiagnostics.cpp')
-rw-r--r-- | clang/lib/Sema/JumpDiagnostics.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Sema/JumpDiagnostics.cpp b/clang/lib/Sema/JumpDiagnostics.cpp index 43a74e1ad83..1f5d682bba1 100644 --- a/clang/lib/Sema/JumpDiagnostics.cpp +++ b/clang/lib/Sema/JumpDiagnostics.cpp @@ -444,9 +444,8 @@ void JumpScopeChecker::BuildScopeInformation(Stmt *S, unsigned &origParentScope) if (ExprWithCleanups *EWC = dyn_cast<ExprWithCleanups>(SubStmt)) { for (unsigned i = 0, e = EWC->getNumObjects(); i != e; ++i) { const BlockDecl *BDecl = EWC->getObject(i); - for (BlockDecl::capture_const_iterator ci = BDecl->capture_begin(), - ce = BDecl->capture_end(); ci != ce; ++ci) { - VarDecl *variable = ci->getVariable(); + for (const auto &CI : BDecl->captures()) { + VarDecl *variable = CI.getVariable(); BuildScopeInformation(variable, BDecl, ParentScope); } } |