[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

James Y Knight via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 31 10:32:20 PDT 2025


jyknight wrote:

Wait, _on by default_?

Perhaps I'm out of line with current thinking here, but IMO, on-by-default should only diagnose things which are likely to be harmful -- NOT just a style or inefficiency issue, which seems to be all this is diagnosing. That LLVM's style conflicts with it also seems like a good indication that it should not be an on by default warning.

I'd actually say it belongs in `-Wextra` -- not even `-Wall`. 

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


More information about the llvm-commits mailing list