PATCH: don't mark pure derived method odr because of a qualified call to base method

John McCall rjmccall at apple.com
Wed Feb 13 10:53:21 PST 2013


On Feb 13, 2013, at 12:53 AM, Nick Lewycky <nlewycky at google.com> wrote:
> Thinking about this issue more, I'd like to retract this patch. Consider the case where we're implementing the rule that all ODR-used inline functions must have a definition. If Derived::fn is marked inline, we'll see a fictitious use of it and reject a valid translation unit.
> 
> My next plan is to remove this code from Sema entirely and do the equivalent work inside codegen proper. No reason it can't keep track of probable virtual function targets when writing out a virtual dispatch.

Ugh.  I am not thrilled by the idea of emitting massive amounts of code because something *might* devirtualize to it.

Also, this potentially requires template instantiation.

John.



More information about the cfe-commits mailing list