aboutsummaryrefslogtreecommitdiff
path: root/clang/lib
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2019-01-18 22:15:09 +0000
committerStephen Kelly <steveire@gmail.com>2019-01-18 22:15:09 +0000
commit1e07f4e2e71e1a582582755e578078dbe1b216ab (patch)
tree2e23119593c2bb7f808e73815651ce9b6f477af2 /clang/lib
parent4e35baa842df5cd169456fe3ba0f25a48317b8c9 (diff)
downloadllvm-1e07f4e2e71e1a582582755e578078dbe1b216ab.zip
llvm-1e07f4e2e71e1a582582755e578078dbe1b216ab.tar.gz
llvm-1e07f4e2e71e1a582582755e578078dbe1b216ab.tar.bz2
[ASTDump] NFC: Move variable into if() statement
llvm-svn: 351605
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/AST/ASTDumper.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/AST/ASTDumper.cpp b/clang/lib/AST/ASTDumper.cpp
index 2b9b132..99e4a1b 100644
--- a/clang/lib/AST/ASTDumper.cpp
+++ b/clang/lib/AST/ASTDumper.cpp
@@ -513,8 +513,7 @@ void ASTDumper::dumpDecl(const Decl *D) {
// Decls within functions are visited by the body.
if (!isa<FunctionDecl>(*D) && !isa<ObjCMethodDecl>(*D)) {
- auto DC = dyn_cast<DeclContext>(D);
- if (DC)
+ if (const auto *DC = dyn_cast<DeclContext>(D))
dumpDeclContext(DC);
}
});