From 6f26b5eeb4cf130b2602bdc93597da4f3419e7e5 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Sun, 1 Jan 2012 17:48:19 +0000 Subject: [PATCH] Replace a isa+cast with a dyn_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147401 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AST/Decl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index f9e57bc706..842ce0f780 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -297,9 +297,9 @@ static LinkageInfo getLVForNamespaceScopeDecl(const NamedDecl *D, LVFlags F) { for (const DeclContext *DC = D->getDeclContext(); !isa(DC); DC = DC->getParent()) { - if (!isa(DC)) continue; - if (llvm::Optional Vis - = cast(DC)->getExplicitVisibility()) { + const NamespaceDecl *ND = dyn_cast(DC); + if (!ND) continue; + if (llvm::Optional Vis = ND->getExplicitVisibility()) { LV.setVisibility(*Vis, false); F.ConsiderGlobalVisibility = false; break; -- 2.40.0