diff options
author | Steve Naroff <snaroff@apple.com> | 2008-10-10 01:28:17 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2008-10-10 01:28:17 +0000 |
commit | 1d95e5a53180b2ba880999258f587b43077c5b1a (patch) | |
tree | c4413b492f1c07f6cc2c58517205fba10aab5698 /clang/lib/AST/DeclBase.cpp | |
parent | eca513d945cd04384b1caaedee90ec97dcb7dba8 (diff) | |
download | bcm5719-llvm-1d95e5a53180b2ba880999258f587b43077c5b1a.tar.gz bcm5719-llvm-1d95e5a53180b2ba880999258f587b43077c5b1a.zip |
Final phase of converting BlockDecls over to DeclContext. This is unfortunately a largish/complex diff, however it was necessry to pass all the current block tests.
llvm-svn: 57337
Diffstat (limited to 'clang/lib/AST/DeclBase.cpp')
-rw-r--r-- | clang/lib/AST/DeclBase.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp index b42950ffc0b..198bc4a19ec 100644 --- a/clang/lib/AST/DeclBase.cpp +++ b/clang/lib/AST/DeclBase.cpp @@ -339,6 +339,8 @@ void Decl::Destroy(ASTContext& C) { DeclContext *DeclContext::getParent() const { if (ScopedDecl *SD = dyn_cast<ScopedDecl>(this)) return SD->getDeclContext(); + else if (BlockDecl *BD = dyn_cast<BlockDecl>(this)) + return BD->getParentContext(); else return NULL; } |