diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-01-12 23:27:07 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-01-12 23:27:07 +0000 |
commit | 482b77d1cb4ca08391d1f749436f092a4cc24427 (patch) | |
tree | 5f979c605aeb3b03497b8b25074be9641b2c64ae /lib/Sema/SemaDecl.cpp | |
parent | 3f20a682baad7f3aa6d2b3a9a3053420e5421e32 (diff) |
Cleanup DeclContext::addDecl and DeclContext::insert interface, from Piotr Rak
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62122 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 6aeda8bc0b..9b419e5b63 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -106,7 +106,7 @@ void Sema::PushOnScopeChains(NamedDecl *D, Scope *S) { // found later. Declarations without a context won't be inserted // into any context. if (ScopedDecl *SD = dyn_cast<ScopedDecl>(D)) - CurContext->addDecl(Context, SD); + CurContext->addDecl(SD); // C++ [basic.scope]p4: // -- exactly one declaration shall declare a class name or @@ -931,7 +931,7 @@ bool Sema::InjectAnonymousStructOrUnionMembers(Scope *S, DeclContext *Owner, // definition, the members of the anonymous union are // considered to have been defined in the scope in which the // anonymous union is declared. - Owner->insert(Context, *F); + Owner->insert(*F); S->AddDecl(*F); IdResolver.AddDecl(*F); } @@ -1090,7 +1090,7 @@ Sema::DeclTy *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS, // Add the anonymous struct/union object to the current // context. We'll be referencing this object when we refer to one of // its members. - Owner->addDecl(Context, Anon); + Owner->addDecl(Anon); // Inject the members of the anonymous struct/union into the owning // context and into the identifier resolver chain for name lookup @@ -3126,7 +3126,7 @@ CreateNewDecl: } else PushOnScopeChains(New, S); } else { - LexicalContext->addDecl(Context, New); + LexicalContext->addDecl(New); } return New; @@ -3296,7 +3296,7 @@ Sema::DeclTy *Sema::ActOnField(Scope *S, DeclTy *TagD, if (II) { PushOnScopeChains(NewFD, S); } else - Record->addDecl(Context, NewFD); + Record->addDecl(NewFD); return NewFD; } |