From: Anders Carlsson Date: Sat, 28 Mar 2009 23:50:18 +0000 (+0000) Subject: Handle the case where the namespace decl is an alias. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=af9e40f9909d89501617897c7295dff68c3907a3;p=clang Handle the case where the namespace decl is an alias. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67965 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/DeclCXX.h b/include/clang/AST/DeclCXX.h index 5f55947a32..389ffaec68 100644 --- a/include/clang/AST/DeclCXX.h +++ b/include/clang/AST/DeclCXX.h @@ -973,7 +973,9 @@ class NamespaceAliasDecl : public NamedDecl { public: NamespaceDecl *getNamespace() { - // FIXME: Namespace can also be an alias decl. + if (NamespaceAliasDecl *AD = dyn_cast(Namespace)) + return AD->getNamespace(); + return cast(Namespace); }