diff options
Diffstat (limited to 'clang-tools-extra/clang-tidy/modernize')
3 files changed, 6 insertions, 5 deletions
diff --git a/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp b/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp index 586deea..6fb7808 100644 --- a/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp +++ b/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp @@ -785,7 +785,7 @@ bool ForLoopIndexUseVisitor::TraverseLambdaCapture(LambdaExpr *LE, C->getLocation())); } if (VDecl->isInitCapture()) - TraverseStmtImpl(cast<VarDecl>(VDecl)->getInit()); + traverseStmtImpl(cast<VarDecl>(VDecl)->getInit()); } return VisitorBase::TraverseLambdaCapture(LE, C, Init); } @@ -815,7 +815,7 @@ bool ForLoopIndexUseVisitor::VisitDeclStmt(DeclStmt *S) { return true; } -bool ForLoopIndexUseVisitor::TraverseStmtImpl(Stmt *S) { +bool ForLoopIndexUseVisitor::traverseStmtImpl(Stmt *S) { // All this pointer swapping is a mechanism for tracking immediate parentage // of Stmts. const Stmt *OldNextParent = NextStmtParent; @@ -838,7 +838,7 @@ bool ForLoopIndexUseVisitor::TraverseStmt(Stmt *S) { return true; } } - return TraverseStmtImpl(S); + return traverseStmtImpl(S); } std::string VariableNamer::createIndexName() { diff --git a/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.h b/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.h index 306eca7..0a0db5e 100644 --- a/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.h +++ b/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.h @@ -354,7 +354,7 @@ private: bool VisitDeclStmt(DeclStmt *S); bool TraverseStmt(Stmt *S); - bool TraverseStmtImpl(Stmt *S); + bool traverseStmtImpl(Stmt *S); /// Add an expression to the list of expressions on which the container /// expression depends. diff --git a/clang-tools-extra/clang-tidy/modernize/UseScopedLockCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseScopedLockCheck.cpp index a004480..9bf3169 100644 --- a/clang-tools-extra/clang-tidy/modernize/UseScopedLockCheck.cpp +++ b/clang-tools-extra/clang-tidy/modernize/UseScopedLockCheck.cpp @@ -217,7 +217,8 @@ void UseScopedLockCheck::diagOnSingleLock( // Create Fix-its only if we can find the constructor call to properly handle // 'std::lock_guard l(m, std::adopt_lock)' case. - const auto *CtorCall = dyn_cast<CXXConstructExpr>(LockGuard->getInit()); + const auto *CtorCall = + dyn_cast_if_present<CXXConstructExpr>(LockGuard->getInit()); if (!CtorCall) return; |
