[clang-tidy] extend `readability-make-member-function-const` to allow calls to private `const`-qualified member functions
Open
clang-tidy
enhancement
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
```cpp
struct S
{
private:
int get_x() const;
int get_y() const;
public:
int get() /*const*/
{
return get_x() * get_y();
}
};
```
https://godbolt.org/z/9fcrvofcf
I would have expected that `const` is being suggested for above code since it appears to be straight-forward. But after reading the documentation it is clear why that is not the case.
But as someone would *probably* mark `get()` as `const` when writing/reviewing the code, adding an option which also allows calls to private `const`-qualified member functions seems acceptable to me.
Contributor guide
Assessment
This issue has not been assessed yet.