mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-27 15:41:46 +00:00
Replace a isa+cast with a dyn_cast.
llvm-svn: 147401
This commit is contained in:
parent
d3df940169
commit
09593a322a
@ -297,9 +297,9 @@ static LinkageInfo getLVForNamespaceScopeDecl(const NamedDecl *D, LVFlags F) {
|
||||
for (const DeclContext *DC = D->getDeclContext();
|
||||
!isa<TranslationUnitDecl>(DC);
|
||||
DC = DC->getParent()) {
|
||||
if (!isa<NamespaceDecl>(DC)) continue;
|
||||
if (llvm::Optional<Visibility> Vis
|
||||
= cast<NamespaceDecl>(DC)->getExplicitVisibility()) {
|
||||
const NamespaceDecl *ND = dyn_cast<NamespaceDecl>(DC);
|
||||
if (!ND) continue;
|
||||
if (llvm::Optional<Visibility> Vis = ND->getExplicitVisibility()) {
|
||||
LV.setVisibility(*Vis, false);
|
||||
F.ConsiderGlobalVisibility = false;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user