[PATCH] Implement DR61: Address of ambiguous bound methods should be disallowed

David Majnemer david.majnemer at gmail.com
Sat Jun 8 01:14:44 PDT 2013


On Fri, Jun 7, 2013 at 10:12 PM, Richard Smith <richard at metafoo.co.uk>wrote:

> Please remove the FIXME from dr0xx.cpp.
>

Done.


>
> I'm not sure the changes to p2-resolve-single-template-id.cpp are
> right -- we should have resolved the name to a single static member
> function in those cases. EDG thinks those cases are valid.
>

You are totally correct. I *wrongly* tried to rationalize GCC's behavior as
it seemed believable. That's the last time I do that...

I've attached a patch that corrects for this.

Thanks
-- 
David Majnemer


>
> On Fri, Jun 7, 2013 at 9:20 PM, David Majnemer <david.majnemer at gmail.com>
> wrote:
> > Sorry, I accidentally forgot to mark the test as passing in dr0xx.cpp.
> >
> > An updated patch is attached.
> >
> > --
> > David Majnemer
> >
> >
> > On Fri, Jun 7, 2013 at 9:15 PM, David Majnemer <david.majnemer at gmail.com
> >
> > wrote:
> >>
> >> clang currently disallows bound methods from having their address taken
> >> but sometimes allows them if the method is overloaded in some way.
> >>
> >> The attached patch implements DR61 [*] which affirms that expressions
> >> containing unresolved member access should be disallowed when performing
> >> "address of" operations.
> >>
> >>
> >> [*] http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#61
> >>
> >> Thanks
> >> --
> >> David Majnemer
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130608/e00cca15/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DR61.diff
Type: application/octet-stream
Size: 3504 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130608/e00cca15/attachment.obj>


More information about the cfe-commits mailing list