Remove another redundant ASTContext parameter

llvm-svn: 95843
This commit is contained in:
Douglas Gregor 2010-02-11 01:30:34 +00:00
parent d505812422
commit 4a62bdfb2a
4 changed files with 6 additions and 6 deletions

View File

@ -382,8 +382,7 @@ public:
}
/// setBases - Sets the base classes of this struct or class.
void setBases(ASTContext &C,
CXXBaseSpecifier const * const *Bases, unsigned NumBases);
void setBases(CXXBaseSpecifier const * const *Bases, unsigned NumBases);
/// getNumBases - Retrieves the number of base classes of this
/// class.

View File

@ -739,7 +739,7 @@ Decl *ASTNodeImporter::VisitRecordDecl(RecordDecl *D) {
T));
}
if (!Bases.empty())
ToCXX->setBases(Importer.getToContext(), Bases.data(), Bases.size());
ToCXX->setBases(Bases.data(), Bases.size());
}
} else {
ToRecord = RecordDecl::Create(Importer.getToContext(), D->getTagKind(),

View File

@ -71,9 +71,10 @@ void CXXRecordDecl::Destroy(ASTContext &C) {
}
void
CXXRecordDecl::setBases(ASTContext &C,
CXXBaseSpecifier const * const *Bases,
CXXRecordDecl::setBases(CXXBaseSpecifier const * const *Bases,
unsigned NumBases) {
ASTContext &C = getASTContext();
// C++ [dcl.init.aggr]p1:
// An aggregate is an array or a class (clause 9) with [...]
// no base classes [...].

View File

@ -641,7 +641,7 @@ bool Sema::AttachBaseSpecifiers(CXXRecordDecl *Class, CXXBaseSpecifier **Bases,
}
// Attach the remaining base class specifiers to the derived class.
Class->setBases(Context, Bases, NumGoodBases);
Class->setBases(Bases, NumGoodBases);
// Delete the remaining (good) base class specifiers, since their
// data has been copied into the CXXRecordDecl.