[PATCH] D70165: clang-tidy: modernize-use-override new option AllowOverrideAndFinal

Conrad Poelman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 14 13:02:16 PST 2019


poelmanc added a comment.

In D70165#1745530 <https://reviews.llvm.org/D70165#1745530>, @alexfh wrote:

> While I have no objections against this patch, I wonder whether someone had a chance to ask GCC developers about this? Is it a conscious choice to suggest `override` when `final` is present? What's the argument for doing so?


Thanks, someone should ask them as I believe this issue extends beyond clang-tidy: code with functions marked `final` //cannot// satisfy both `gcc -Wsuggest-override` and `clang -Winconsistent-missing-override`; `gcc` demands `override final` and `clang` demands just `final`.

Even if `clang` and `gcc` find a common ground, people will be stuck with current versions for quite a while, so this clang-tidy patch should prove helpful.


Repository:
  rCTE Clang Tools Extra

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70165/new/

https://reviews.llvm.org/D70165





More information about the cfe-commits mailing list