aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclBase.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-11-19 18:07:24 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-11-19 18:07:24 +0000
commit051c13a4a99c651e404b4a3160e1173b427eee17 (patch)
treeee935ea89d32adab931735f902afa324bac42ed2 /lib/AST/DeclBase.cpp
parent77407b802130b1c44b1f63b855722a5376f57bca (diff)
Make DeclContext::getLexicalParent reuse DeclContext::getParent.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59651 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclBase.cpp')
-rw-r--r--lib/AST/DeclBase.cpp5
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();
}