r210813 - MS ABI: Fix forming pointers to members of a base class

Reid Kleckner rnk at google.com
Thu Jun 12 14:54:50 PDT 2014


On Thu, Jun 12, 2014 at 2:18 PM, Nico Weber <thakis at chromium.org> wrote:

> On Thu, Jun 12, 2014 at 12:49 PM, Reid Kleckner <reid at kleckner.net> wrote:
>
>> Author: rnk
>> Date: Thu Jun 12 14:49:17 2014
>> New Revision: 210813
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=210813&view=rev
>> Log:
>> MS ABI: Fix forming pointers to members of a base class
>>
>> Previously we would calculate the inheritance model of a class when
>> requiring a pointer to member type of that class to be complete.  The
>> inheritance model is used to figure out how many fields are used by the
>> member pointer.
>>
>> However, once we require a pointer to member of a derived class type to
>> be complete, we can form pointers to members of bases without
>> calculating the inheritance model for those bases.  This was causing
>> crashes on this simple test case:
>>
>>   struct A {
>>     void f();
>>     void f(int);
>>   };
>>   struct B : public A {};
>>   void g() { void (B::*a)() = &B::f; }
>>
>> Now we calculate the inheritance models of all base classes when
>> completing a member pointer type.
>>
>> Fixes PR2007.
>>
>
> PR20007 (one more 0), right? (Also in the test)
>

Woops, thanks!  r210834
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140612/132ca698/attachment.html>


More information about the cfe-commits mailing list