[patch] Let -Wdelete-non-virtual-dtor mention that making the class final is a good fix too
Nico Weber via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 16 12:10:45 PST 2015
r255812, thanks!
On Mon, Dec 14, 2015 at 6:45 PM, David Blaikie <dblaikie at gmail.com> wrote:
> LGTM, please commit (if you like, if you want to wait for other feedback
> that's OK too)
>
> On Tue, Dec 15, 2015 at 2:15 AM, Nico Weber <thakis at chromium.org> wrote:
>
>> On Sun, Dec 13, 2015 at 6:57 PM, David Blaikie <dblaikie at gmail.com>
>> wrote:
>>
>>> (attachment missing)
>>>
>>
>> (whoops. looks as expected though, here it is.)
>>
>> Cursory review based on description: Sounds reasonable to me. Would want
>>> to check the C++98 behavior to ensure it is actually relevant/correct to
>>> imply the possibility of 'final' being used to fix the issue.
>>>
>>
>> test.cc:1:9: warning: 'final' keyword is a C++11 extension
>> [-Wc++11-extensions]
>> class C final {};
>> ^
>>
>>
>>>
>>> On Sun, Dec 13, 2015 at 1:37 AM, Nico Weber via cfe-commits <
>>> cfe-commits at lists.llvm.org> wrote:
>>>
>>>> Hi,
>>>>
>>>> the attached patch changes
>>>>
>>>> delete called on 'dnvd::B' that has virtual functions but non-virtual
>>>> destructor
>>>>
>>>> to
>>>>
>>>> delete called on non-final 'dnvd::B' that has virtual functions but
>>>> non-virtual destructor
>>>>
>>>> I'm not sure if it should only do this for c++11 and newer – the new
>>>> message is true in c++98 as well and I think we support final as an
>>>> extension in c++98. So this patch unconditionally changes the warning text.
>>>>
>>>> Nico
>>>>
>>>> _______________________________________________
>>>> cfe-commits mailing list
>>>> cfe-commits at lists.llvm.org
>>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151216/e43b436e/attachment.html>
More information about the cfe-commits
mailing list