]> granicus.if.org Git - clang/commit
Split -Wdelete-non-virtual-dtor into -Wdelete-abstract-non-virtual-dtor
authorErik Pilkington <erik.pilkington@gmail.com>
Tue, 8 Jan 2019 00:21:05 +0000 (00:21 +0000)
committerErik Pilkington <erik.pilkington@gmail.com>
Tue, 8 Jan 2019 00:21:05 +0000 (00:21 +0000)
commit2b01328de2b9738cf847a27b227eceac8ac5bcf6
tree2a79cacc843ab53ec14f962495474d7fc48cda15
parent425b89a8d02393a39cfe223b84e3396841708794
Split -Wdelete-non-virtual-dtor into -Wdelete-abstract-non-virtual-dtor

-Wdelete-non-virtual-dtor previously controlled two diagnostics: 1)
calling a non-virtual dtor from an abstract class, and 2) calling a
non-virtual dtor from a polymorphic class. 1) is a lot more severe
than 2), since 1) is a guaranteed crash, but 2) is just "code smell".
Previously, projects compiled with -Wall -Wno-delete-non-virtual-dtor,
which is somewhat reasonable, silently crashed on 1).

rdar://40380564

Differential revision: https://reviews.llvm.org/D56405

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350585 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticSemaKinds.td
test/SemaCXX/non-virtual-dtors.cpp [new file with mode: 0644]