Maybe the record decl is dependent?  We should be hitting
RequireCompleteType() in SemaType, and I would expect it to be complete at
this point.

I have a few template tests, but I don't think I was creative enough with
C++ to catch this.  Can you make a minimal repro with deltamin or something?

As a workaround, we could return MSIM_Unspecified for incomplete types that
come here, but this is likely to have other edge case bugs because the size
could shrink if the decl ever becomes complete and then we generate some
member pointer code.


On Wed, Apr 3, 2013 at 6:44 PM, João Matos <[email protected]> wrote:

> On Tue, Apr 2, 2013 at 5:23 PM, Reid Kleckner <[email protected]> wrote:
>
> +MSInheritanceModel CXXRecordDecl::getMSInheritanceModel() const {
>> +  Attr *IA = this->getAttr<MSInheritanceAttr>();
>> +  if (IA)
>> +    return MSInheritanceAttrToModel(IA->getKind());
>> +  // If there was no explicit attribute, the record must be defined
>> already, and
>> +  // we can figure out the inheritance model from its other properties.
>> +  if (this->getNumVBases() > 0)
>> +    return IHM_Virtual;
>
>
> I am getting an assert here. Specifically, getNumVBases() asserts in
> data() because the record has no definition data. According to the comment
> it should be defined when reaching that line.
>
> Any guesses why this is happening?
>
> _______________________________________________
> cfe-commits mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to