aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp b/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp
index c20472c..74dd4a3 100644
--- a/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp
@@ -10,8 +10,8 @@
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/Lambda.h"
-#include "clang/Basic/SourceManager.h"
#include "clang/Basic/SourceLocation.h"
+#include "clang/Basic/SourceManager.h"
#include "clang/Basic/TokenKinds.h"
#include "clang/Lex/Lexer.h"
#include "llvm/ADT/APSInt.h"
@@ -50,8 +50,8 @@ bool StmtAncestorASTVisitor::TraverseStmt(Stmt *Statement) {
/// Scope, as we can map a VarDecl to its DeclStmt, then walk up the parent tree
/// using StmtAncestors.
bool StmtAncestorASTVisitor::VisitDeclStmt(DeclStmt *Decls) {
- for (const auto *decl : Decls->decls()) {
- if (const auto *V = dyn_cast<VarDecl>(decl))
+ for (const auto *Decl : Decls->decls()) {
+ if (const auto *V = dyn_cast<VarDecl>(Decl))
DeclParents.insert(std::make_pair(V, Decls));
}
return true;
@@ -356,7 +356,7 @@ static bool isAliasDecl(ASTContext *Context, const Decl *TheDecl,
bool OnlyCasts = true;
const Expr *Init = VDecl->getInit()->IgnoreParenImpCasts();
- if (Init && isa<CXXConstructExpr>(Init)) {
+ if (isa_and_nonnull<CXXConstructExpr>(Init)) {
Init = digThroughConstructors(Init);
OnlyCasts = false;
}