summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-02-19 07:02:09 +0000
committerChris Lattner <sabre@nondot.org>2009-02-19 07:02:09 +0000
commit74c04eb99e1a5038923ea894207a51fce35384f9 (patch)
treed5a1bad17f967fb81ee31a19cecfb4ab451ffb38 /clang/lib
parentdfd6b3d19084bbd16e1660e9500fde2838ccd011 (diff)
downloadbcm5719-llvm-74c04eb99e1a5038923ea894207a51fce35384f9.tar.gz
bcm5719-llvm-74c04eb99e1a5038923ea894207a51fce35384f9.zip
minor simplification.
llvm-svn: 65029
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/AST/DeclBase.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp
index 6b2a1ffc5e7..c03c36048a2 100644
--- a/clang/lib/AST/DeclBase.cpp
+++ b/clang/lib/AST/DeclBase.cpp
@@ -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();
OpenPOWER on IntegriCloud