Fixed a bug in building ctor-initializer AST.

llvm-svn: 75692
This commit is contained in:
Fariborz Jahanian 2009-07-14 22:40:50 +00:00
parent bb0d9a5129
commit 5da7ecb245
1 changed files with 3 additions and 2 deletions

View File

@ -496,7 +496,7 @@ CXXConstructorDecl::setBaseOrMemberInitializers(
for (i = 0; i < NumInitializers; i++) {
CXXBaseOrMemberInitializer *Member = Initializers[i];
if (Member->isBaseInitializer() &&
Member->getBaseClass() == T) {
Member->getBaseClass()->getAsRecordType() == T) {
AllToInit.push_back(Member);
break;
}
@ -517,7 +517,8 @@ CXXConstructorDecl::setBaseOrMemberInitializers(
unsigned int i = 0;
for (i = 0; i < NumInitializers; i++) {
CXXBaseOrMemberInitializer *Member = Initializers[i];
if (Member->isBaseInitializer() && Member->getBaseClass() == T) {
if (Member->isBaseInitializer() &&
Member->getBaseClass()->getAsRecordType() == T) {
AllToInit.push_back(Member);
break;
}