[cfe-commits] r59651 - /cfe/trunk/lib/AST/DeclBase.cpp
Argiris Kirtzidis
akyrtzi at gmail.com
Wed Nov 19 10:07:24 PST 2008
Author: akirtzidis
Date: Wed Nov 19 12:07:24 2008
New Revision: 59651
URL: http://llvm.org/viewvc/llvm-project?rev=59651&view=rev
Log:
Make DeclContext::getLexicalParent reuse DeclContext::getParent.
Modified:
cfe/trunk/lib/AST/DeclBase.cpp
Modified: cfe/trunk/lib/AST/DeclBase.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclBase.cpp?rev=59651&r1=59650&r2=59651&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclBase.cpp (original)
+++ cfe/trunk/lib/AST/DeclBase.cpp Wed Nov 19 12:07:24 2008
@@ -365,8 +365,5 @@
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();
}
More information about the cfe-commits
mailing list