r174242 - This patch makes "&Cls::purevfn" not an odr use. This isn't what the standard
John McCall
rjmccall at apple.com
Mon Feb 4 10:18:42 PST 2013
On Feb 1, 2013, at 5:16 PM, Nick Lewycky <nlewycky at google.com> wrote:
> On 1 February 2013 16:44, John McCall <rjmccall at apple.com> wrote:
> On Feb 1, 2013, at 4:30 PM, Richard Smith <richard at metafoo.co.uk> wrote:
> > On Fri, Feb 1, 2013 at 4:25 PM, Nick Lewycky <nicholas at mxc.ca> wrote:
> >> Author: nicholas
> >> Date: Fri Feb 1 18:25:55 2013
> >> New Revision: 174242
> >>
> >> URL: http://llvm.org/viewvc/llvm-project?rev=174242&view=rev
> >> Log:
> >> This patch makes "&Cls::purevfn" not an odr use. This isn't what the standard
> >> says, but that's a defect (to be filed). "Cls::purevfn()" is still an odr use.
>
> Why is this specific to *pure* virtual functions? Shouldn't it be
> *any* virtual function?
>
> I mean, non-pure virtual functions are universally ODR-used anyway,
> but there's no plausible implementation model in which &Cls::vfn
> specifically requires a reference to the function.
>
> I think you're right. I had been focusing on pure functions, as the standard calls out pure function specifically in the odr section.
>
> Do you want me to change the "if (Method->isPure())" to "if (Method->isVirtual)" then? It seems odd to have comments talking about pure members then suddenly testing for virtual instead.
Please. We certainly don't need to (e.g.) instantiate functions in this case.
John.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130204/2dc6f943/attachment.html>
More information about the cfe-commits
mailing list