A few change per Doug's feedback.

- Fariborz

llvm-svn: 74909
This commit is contained in:
Fariborz Jahanian 2009-07-07 16:24:08 +00:00
parent 54751921ca
commit 003a880c41
2 changed files with 8 additions and 9 deletions

View File

@ -750,17 +750,17 @@ public:
/// init_const_iterator - Iterates through the memberbase initializer list.
typedef CXXBaseOrMemberInitializer * const * init_const_iterator;
/// init_begin() - Retrieve an iterator to the first initializer.
init_iterator init_begin() { return BaseOrMemberInitializers; }
/// begin() - Retrieve an iterator to the first initializer.
init_iterator begin() { return BaseOrMemberInitializers; }
/// begin() - Retrieve an iterator to the first initializer.
init_const_iterator begin() const { return BaseOrMemberInitializers; }
init_const_iterator init_begin() const { return BaseOrMemberInitializers; }
/// end() - Retrieve an iterator past the last initializer.
init_iterator end() {
/// init_end() - Retrieve an iterator past the last initializer.
init_iterator init_end() {
return BaseOrMemberInitializers + NumBaseOrMemberInitializers;
}
/// end() - Retrieve an iterator past the last initializer.
init_const_iterator end() const {
init_const_iterator init_end() const {
return BaseOrMemberInitializers + NumBaseOrMemberInitializers;
}

View File

@ -419,7 +419,7 @@ CXXConstructorDecl::setBaseOrMemberInitializers(
if (NumInitializers > 0) {
NumBaseOrMemberInitializers = NumInitializers;
BaseOrMemberInitializers =
new (C, 8) CXXBaseOrMemberInitializer*[NumInitializers];
new (C) CXXBaseOrMemberInitializer*[NumInitializers];
for (unsigned Idx = 0; Idx < NumInitializers; ++Idx)
BaseOrMemberInitializers[Idx] = Initializers[Idx];
}
@ -428,8 +428,7 @@ CXXConstructorDecl::setBaseOrMemberInitializers(
void
CXXConstructorDecl::Destroy(ASTContext& C) {
C.Deallocate(BaseOrMemberInitializers);
this->~CXXMethodDecl();
C.Deallocate((void *)this);
CXXMethodDecl::Destroy(C);
}
CXXConversionDecl *