diff options
author | Stephen Kelly <steveire@gmail.com> | 2019-01-18 22:15:09 +0000 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2019-01-18 22:15:09 +0000 |
commit | 1e07f4e2e71e1a582582755e578078dbe1b216ab (patch) | |
tree | 2e23119593c2bb7f808e73815651ce9b6f477af2 /clang/lib | |
parent | 4e35baa842df5cd169456fe3ba0f25a48317b8c9 (diff) | |
download | llvm-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.cpp | 3 |
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); } }); |