[cfe-commits] r76758 - in /cfe/trunk/lib: AST/DeclCXX.cpp Sema/SemaDeclCXX.cpp Sema/SemaTemplateInstantiate.cpp

John McCall rjmccall at apple.com
Wed Jul 22 13:32:03 PDT 2009


Fariborz Jahanian wrote:
> ==============================================================================
> --- cfe/trunk/lib/AST/DeclCXX.cpp (original)
> +++ cfe/trunk/lib/AST/DeclCXX.cpp Wed Jul 22 12:41:53 2009
> @@ -129,7 +130,7 @@
>        CXXRecordDecl *VBaseClassDecl
>          = cast<CXXRecordDecl>(QT->getAsRecordType()->getDecl());
>        this->VBases[i] = 
> -        *new CXXBaseSpecifier(
> +        *new (C) CXXBaseSpecifier(
>                            VBaseClassDecl->getSourceRange(), true,
>                            VBaseClassDecl->getTagKind() == RecordDecl::TK_class,
>                            UniqueVbases[i]->getAccessSpecifier(), QT)

Is there some crazy reason this needs to involve an allocation at all, 
rather than just
    this->VBases[i] = CXXBaseSpecifier(...);
?

John.



More information about the cfe-commits mailing list