summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 2b9b132eea7..99e4a1bc583 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);
}
});
OpenPOWER on IntegriCloud