diff options
-rw-r--r-- | lib/AST/DeclBase.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index c0655cf9ce..2bfb5ae607 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -365,8 +365,5 @@ const DeclContext *DeclContext::getParent() const { const DeclContext *DeclContext::getLexicalParent() const { if (const ScopedDecl *SD = dyn_cast<ScopedDecl>(this)) return SD->getLexicalDeclContext(); - else if (const BlockDecl *BD = dyn_cast<BlockDecl>(this)) - return BD->getParentContext(); - else - return NULL; + return getParent(); } |