[clang] Warn about virtual methods in `final` classes (PR #131188)

Hans Wennborg via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 14 06:40:52 PDT 2025


zmodem wrote:

> What do you think about implementing the suggestion about checking if virtual methods actually get overridden or not?

Since we could only do it for classes with internal linkage, I think it's probably not very valuable.

Warning about virtual functions that are not overriding anything and cannot be overridden because `final` seems high value though.

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


More information about the cfe-commits mailing list