[cfe-commits] [patch] Fix a crash in code gen (& an accepts invalid) for arrays of arrays of user defined types under certain circumstances
John McCall
rjmccall at apple.com
Sat Mar 10 11:46:04 PST 2012
On Mar 10, 2012, at 9:44 AM, David Blaikie wrote:
> This fixes a hole in handling arrays of arrays of user defined types
> that lead to the udt's ctor not being marked used (& not being
> generated in the case of a non trivial implicit dtor in a template) &
> not being access checked (in the case of a private dtor). The original
> functionality doesn't seem to have ever been tested - so if there's
> other test cases anyone thinks this functionality needs, I'd be happy
> to add those here too.
Looks good to me.
- cast<CXXRecordDecl>(AllocType->getAs<RecordType>()->getDecl()))) {
+ cast<CXXRecordDecl>(BaseAllocType->getAs<RecordType>()->getDecl()))) {
I know this is pre-existing, but please change the dominating isRecordType() check to use getAs and then re-use that result here.
John.
More information about the cfe-commits
mailing list