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
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 6aeda8b..9b419e5 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -106,7 +106,7 @@
// 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 @@
// 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 @@
// 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 @@
} else
PushOnScopeChains(New, S);
} else {
- LexicalContext->addDecl(Context, New);
+ LexicalContext->addDecl(New);
}
return New;
@@ -3296,7 +3296,7 @@
if (II) {
PushOnScopeChains(NewFD, S);
} else
- Record->addDecl(Context, NewFD);
+ Record->addDecl(NewFD);
return NewFD;
}