minor simplification.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65029 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp
index 6b2a1ff..c03c360 100644
--- a/lib/AST/DeclBase.cpp
+++ b/lib/AST/DeclBase.cpp
@@ -580,9 +580,9 @@
}
// Put this declaration into the appropriate slot.
- if (D->getKind() == Decl::UsingDirective ||
- D->getIdentifierNamespace() == Decl::IDNS_Tag
- || Pos->second.empty())
+ if (isa<UsingDirectiveDecl>(D) ||
+ D->getIdentifierNamespace() == Decl::IDNS_Tag ||
+ Pos->second.empty())
Pos->second.push_back(D);
else if (Pos->second.back()->getIdentifierNamespace() == Decl::IDNS_Tag) {
NamedDecl *TagD = Pos->second.back();