[PATCH] D66365: [clang-tidy] [readability-convert-member-functions-to-static] ignore functions that hide base class methods

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 19 07:54:41 PDT 2019


aaron.ballman added a comment.

I'd like some help in understanding the motivation for this change. The bug report says `But the intention behind this is clearly that there is a member function A::foo which derived classes overwrite.` and I'm not certain that's so clear. It's been my experience that hidden member function names are unusual and it's hard to ascribe intent to them.

FWIW, I would find this new behavior to be confusing. My mental model for this check is "if it doesn't need to be a member function, make it a static function instead", and this behavior doesn't fit that model.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D66365





More information about the cfe-commits mailing list