summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclBase.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-28 06:04:26 +0000
committerChris Lattner <sabre@nondot.org>2009-03-28 06:04:26 +0000
commitfcd33a68e43ae8683abc49bfe6a01fb0e016b704 (patch)
tree7dfb67cc4134b1f690dcb64de4e5d29c4f004712 /clang/lib/AST/DeclBase.cpp
parentb129e28d11d95bc66d5ca5a704b2dd7f6796a512 (diff)
downloadbcm5719-llvm-fcd33a68e43ae8683abc49bfe6a01fb0e016b704.tar.gz
bcm5719-llvm-fcd33a68e43ae8683abc49bfe6a01fb0e016b704.zip
rename NextDeclInScope to NextDeclInContext, since the pointer
points within contexts not scopes. llvm-svn: 67919
Diffstat (limited to 'clang/lib/AST/DeclBase.cpp')
-rw-r--r--clang/lib/AST/DeclBase.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp
index 72ac5552201..634c86e361d 100644
--- a/clang/lib/AST/DeclBase.cpp
+++ b/clang/lib/AST/DeclBase.cpp
@@ -282,15 +282,15 @@ void Decl::Destroy(ASTContext &C) {
if (DeclContext *DC = dyn_cast<DeclContext>(this))
DC->decls_begin()->Destroy(C);
- // Observe the unrolled recursion. By setting N->NextDeclInScope = 0x0
+ // Observe the unrolled recursion. By setting N->NextDeclInContext = 0x0
// within the loop, only the Destroy method for the first Decl
// will deallocate all of the Decls in a chain.
- Decl* N = NextDeclInScope;
+ Decl* N = getNextDeclInContext();
while (N) {
- Decl* Tmp = N->NextDeclInScope;
- N->NextDeclInScope = 0;
+ Decl* Tmp = N->getNextDeclInContext();
+ N->NextDeclInContext = 0;
N->Destroy(C);
N = Tmp;
}
@@ -541,7 +541,7 @@ DeclContext *DeclContext::getPrimaryContext() {
if (DeclKind >= Decl::TagFirst && DeclKind <= Decl::TagLast) {
// If this is a tag type that has a definition or is currently
// being defined, that definition is our primary context.
- if (const TagType *TagT = cast<TagDecl>(this)->TypeForDecl->getAsTagType())
+ if (const TagType *TagT =cast<TagDecl>(this)->TypeForDecl->getAsTagType())
if (TagT->isBeingDefined() ||
(TagT->getDecl() && TagT->getDecl()->isDefinition()))
return TagT->getDecl();
@@ -568,11 +568,11 @@ DeclContext *DeclContext::getNextContext() {
void DeclContext::addDecl(Decl *D) {
assert(D->getLexicalDeclContext() == this &&
"Decl inserted into wrong lexical context");
- assert(!D->NextDeclInScope && D != LastDecl &&
+ assert(!D->getNextDeclInContext() && D != LastDecl &&
"Decl already inserted into a DeclContext");
if (FirstDecl) {
- LastDecl->NextDeclInScope = D;
+ LastDecl->NextDeclInContext = D;
LastDecl = D;
} else {
FirstDecl = LastDecl = D;
OpenPOWER on IntegriCloud