[cfe-commits] [Patch] Fix for r163013 regression and further __interface enhancement

John McCall rjmccall at apple.com
Wed Sep 12 11:28:03 PDT 2012


On Sep 12, 2012, at 11:26 AM, Andy Gibbs wrote:
> On Wednesday, September 12, 2012 6:26 PM, John McCall wrote:
> On Sep 12, 2012, at 4:24 AM, Richard Smith wrote:
>> On Wed, Sep 12, 2012 at 2:08 AM, Andy Gibbs <andyg1001 at hotmail.co.uk> wrote:
>> Hi,
>> 
>> Attached are two patches to complement the recent work done by David Robins on __interface.
>> 
>> The first, interface-fix.diff, corrects a codegen regression created by r163013 whereby all methods (including constructors) inside an __interface were being marked pure virtual and were causing the vtable generation to be invalid.
>> 
>> Applying this to operators doesn't seem correct, since an __interface shouldn't have any operators in the first place.  Also, getOverloadedOperator doesn't check for conversion operators.
> 
> Presumably it gets the implicit copy/move assignment operators, which should definitely not be virtual.
> 
> Oh, and could someone check whether __interface implicitly declares a virtual destructor?  That seems like a possibility.
> 
> John.
> That's right, but as Richard pointed out, if the two patches are combined, it is enough to check if the method is user-provided (since user-provided constructors, destructors and operators are not allowed).

Would you mind checking whether __interface implicitly declares a virtual destructor?  This is important.

John.




More information about the cfe-commits mailing list