From e9a265a26709591c7338385012d07571873d9e9b Mon Sep 17 00:00:00 2001 From: Martin Bohme Date: Wed, 17 Aug 2016 15:00:22 +0000 Subject: Adapt to TraverseLambdaCapture interface change from D23204 Summary: Depends on D23204. This is intended to be submitted immediately after D23204 lands. Reviewers: jdennett, alexfh Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D23543 llvm-svn: 278934 --- clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp') diff --git a/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp b/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp index 55ca0d7..432430e 100644 --- a/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp +++ b/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp @@ -763,7 +763,8 @@ bool ForLoopIndexUseVisitor::VisitDeclRefExpr(DeclRefExpr *E) { /// } /// \endcode bool ForLoopIndexUseVisitor::TraverseLambdaCapture(LambdaExpr *LE, - const LambdaCapture *C) { + const LambdaCapture *C, + Expr *Init) { if (C->capturesVariable()) { const VarDecl *VDecl = C->getCapturedVar(); if (areSameVariable(IndexVar, cast(VDecl))) { @@ -776,7 +777,7 @@ bool ForLoopIndexUseVisitor::TraverseLambdaCapture(LambdaExpr *LE, C->getLocation())); } } - return VisitorBase::TraverseLambdaCapture(LE, C); + return VisitorBase::TraverseLambdaCapture(LE, C, Init); } /// \brief If we find that another variable is created just to refer to the loop -- cgit v1.1