]> granicus.if.org Git - clang/commitdiff
[NFC] Fix for rL370594
authorDavid Bolvansky <david.bolvansky@gmail.com>
Sat, 31 Aug 2019 18:35:44 +0000 (18:35 +0000)
committerDavid Bolvansky <david.bolvansky@gmail.com>
Sat, 31 Aug 2019 18:35:44 +0000 (18:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@370595 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticSemaKinds.td

index 3391f371dcf8971affddd6231f9f7413d19adb1f..45e34df4d58d73e538d459158396d96817e17769 100644 (file)
@@ -113,6 +113,7 @@ def DeleteNonVirtualDtor : DiagGroup<"delete-non-virtual-dtor",
                                      [DeleteNonAbstractNonVirtualDtor,
                                       DeleteAbstractNonVirtualDtor]>;
 def AbstractFinalClass : DiagGroup<"abstract-final-class">;
+def FinalDtorNonFinalClass : DiagGroup<"final-dtor-non-final-class">;
 
 def CXX11CompatDeprecatedWritableStr :
   DiagGroup<"c++11-compat-deprecated-writable-strings">;
index 8b52dd8ae50fe70aacb36de67aa2116dbd18ec07..93be2cd476a9aca8b9f8348fec8b11a0499e6e84 100644 (file)
@@ -2224,6 +2224,11 @@ def err_class_marked_final_used_as_base : Error<
   "base %0 is marked '%select{final|sealed}1'">;
 def warn_abstract_final_class : Warning<
   "abstract class is marked '%select{final|sealed}0'">, InGroup<AbstractFinalClass>;
+def warn_final_dtor_non_final_class : Warning<
+  "class with destructor marked '%select{final|sealed}0' cannot be inherited from">,
+  InGroup<FinalDtorNonFinalClass>;
+def note_final_dtor_non_final_class_silence : Note<
+  "mark %0 as '%select{final|sealed}1' to silence this warning">;
 
 // C++11 attributes
 def err_repeat_attribute : Error<"%0 attribute cannot be repeated">;