[clang-tools-extra] [clang-tidy] Add option to keep virtual in 'modernize-use-override' (PR #144916)

2025-06-19 Thread Frank Winklmeier via cfe-commits
https://github.com/fwinkl edited https://github.com/llvm/llvm-project/pull/144916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add option to keep virtual in 'modernize-use-override' (PR #144916)

2025-06-19 Thread Frank Winklmeier via cfe-commits
@@ -226,7 +232,8 @@ void UseOverrideCheck::check(const MatchFinder::MatchResult &Result) { CharSourceRange::getTokenRange(OverrideLoc, OverrideLoc)); } - if (HasVirtual) { + // Remove virtual unless requested otherwise fwinkl wrote: Note that eve

[clang-tools-extra] [clang-tidy] Add option to keep virtual in 'modernize-use-override' (PR #144916)

2025-06-19 Thread Frank Winklmeier via cfe-commits
https://github.com/fwinkl created https://github.com/llvm/llvm-project/pull/144916 Add a new `AllowVirtual` option to 'modernize-use-override', which does not remove the `virtual` specifier. This is useful because some coding guidelines may suggest to use `virtual ... override` for clarity. Se