[clang-tools-extra] [clang-tidy][docs] Clarify virtual-class-destructor covers only C.35 rule 1 (PR #214659)

Zeyi Xu via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 11 23:52:07 PDT 2026


================
@@ -7,9 +7,13 @@ Finds virtual classes whose destructor is neither public and virtual
 nor protected and non-virtual. A virtual class's destructor should be specified
 in one of these ways to prevent undefined behavior.
 
-This check implements
+This check implements the first enforcement rule of
----------------
zeyi2 wrote:

IMO this still seems to overstate the check's coverage slightly (e.g. the matcher explicitly excludes final classes even when they have virtual functions and a public non-virtual destructor).

Could we clarify that this applies only to non-final classes?

https://github.com/llvm/llvm-project/pull/214659


More information about the cfe-commits mailing list