[PATCH] D56405: Split -Wdelete-non-virtual-dtor into two groups

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 7 16:59:54 PST 2019


aaron.ballman added inline comments.


================
Comment at: include/clang/Basic/DiagnosticGroups.td:108-109
 def DeleteNonVirtualDtor : DiagGroup<"delete-non-virtual-dtor">;
+def DeleteAbstractNonVirtualDtor : DiagGroup<"delete-abstract-non-virtual-dtor",
+                                             [DeleteNonVirtualDtor]>;
 def AbstractFinalClass : DiagGroup<"abstract-final-class">;
----------------
rsmith wrote:
> This is backwards: this says that `-Wdelete-abstract-non-virtual-dtor` also controls `-Wdelete-non-virtual-dtor`. You presumably want the opposite relationship, so that `-Wdelete-non-virtual-dtor` controls both warnings and `-Wdelete-abstract-non-virtual-dtor` only controls the "abstract" warning.
I took this to be the correct order because disabling the abstract case is more dangerous than disabling the non-abstract case (if you disable the abstract one, you're saying "I don't care how bad it gets, don't tell me about it.").


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56405/new/

https://reviews.llvm.org/D56405





More information about the cfe-commits mailing list