]> granicus.if.org Git - clang/commitdiff
minor simplification.
authorChris Lattner <sabre@nondot.org>
Thu, 19 Feb 2009 07:02:09 +0000 (07:02 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 19 Feb 2009 07:02:09 +0000 (07:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65029 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/DeclBase.cpp

index 6b2a1ffc5e727ac0c2d930b57dbc2556b655a2e0..c03c36048a2473d2171e53edb4fd136852b46d05 100644 (file)
@@ -580,9 +580,9 @@ void DeclContext::makeDeclVisibleInContextImpl(NamedDecl *D) {
   }
 
   // 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();