[llvm-commits] [llvm] r164813 - /llvm/trunk/include/llvm/Operator.h

David Blaikie dblaikie at gmail.com
Thu Oct 4 14:14:40 PDT 2012


If you want to file a bug I'll probably look at this along with
PR13684 at some point. Chatted to Richard/Doug/John yesterday about
some of the finer points that Clang gets wrong/how we should get them
right.

On Thu, Oct 4, 2012 at 1:59 PM, Craig Topper <craig.topper at gmail.com> wrote:
> Richard, is this something you can fix in clang or should I file a bug?
>
>
> On Wed, Oct 3, 2012 at 3:28 PM, Richard Smith <richard at metafoo.co.uk> wrote:
>>
>> Yes, this code is ill-formed, by [class.virtual]p16: "A function with a
>> deleted definition (8.4) shall not override a function that does not have a
>> deleted definition. Likewise, a function that does not have a deleted
>> definition shall not override a function with a deleted definition."
>>
>> On Wed, Oct 3, 2012 at 3:22 PM, Craig Topper <craig.topper at gmail.com>
>> wrote:
>>>
>>> Should clang error on this like gcc?
>>>
>>>
>>> On Wed, Oct 3, 2012 at 1:32 PM, David Blaikie <dblaikie at gmail.com> wrote:
>>>>
>>>> On Wed, Oct 3, 2012 at 12:05 PM, Eli Friedman <eli.friedman at gmail.com>
>>>> wrote:
>>>> > On Wed, Oct 3, 2012 at 10:22 AM, David Blaikie <dblaikie at gmail.com>
>>>> > wrote:
>>>> >> Oh, I see, this is an intermediate abstract class? I didn't test that
>>>> >> case, I was just directly instantiating the class I was testing.
>>>> >>
>>>> >> OK, now I'm confused by this Operator type. How is it useful? If the
>>>> >> ctor is deleted then no derived type could ever be instantiated,
>>>> >> could
>>>> >> it? So why would these be types at all instead of collections of
>>>> >> static utility functions?
>>>> >
>>>> > There isn't any good reason other than historical precedent; this code
>>>> > has been around for a very long time.
>>>>
>>>> Good to know & Benjamin explained some of the details on IRC. A battle
>>>> for another day, it seems. (taking bets on how long it'll be before
>>>> Richard Smith finds this with -fcatch-undefined-behavior)
>>>>
>>>> - David
>>>
>>>
>>>
>>>
>>> --
>>> ~Craig
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>>
>>
>
>
>
> --
> ~Craig



More information about the llvm-commits mailing list