[cfe-commits] r76758 - in /cfe/trunk/lib: AST/DeclCXX.cpp Sema/SemaDeclCXX.cpp Sema/SemaTemplateInstantiate.cpp
Fariborz Jahanian
fjahanian at apple.com
Wed Jul 22 13:45:16 PDT 2009
On Jul 22, 2009, at 1:32 PM, John McCall wrote:
> 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(...);
This creates a temporary which will go out of scope when we return
from this function.
- Fariborz
>
> ?
>
> John.
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list