From f33610fed0f33eb24c213517e1d38e589bb944e2 Mon Sep 17 00:00:00 2001 From: David Bolvansky Date: Sat, 31 Aug 2019 18:35:44 +0000 Subject: [PATCH] [NFC] Fix for rL370594 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@370595 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/DiagnosticGroups.td | 1 + include/clang/Basic/DiagnosticSemaKinds.td | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/include/clang/Basic/DiagnosticGroups.td b/include/clang/Basic/DiagnosticGroups.td index 3391f371dc..45e34df4d5 100644 --- a/include/clang/Basic/DiagnosticGroups.td +++ b/include/clang/Basic/DiagnosticGroups.td @@ -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">; diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 8b52dd8ae5..93be2cd476 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -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; +def warn_final_dtor_non_final_class : Warning< + "class with destructor marked '%select{final|sealed}0' cannot be inherited from">, + InGroup; +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">; -- 2.40.0