Issue |
93282
|
Summary |
extend `misc-const-correctness` to private members
|
Labels |
clang-tidy
|
Assignees |
|
Reporter |
firewave
|
The check currently only applies to local variables but it would probably make sense to also extend this to private members.
```cpp
class C
{
public:
C(char * p)
: _p1(p)
, _p2(p)
{}
void f() {
if (_p1) {}
if (_p2) {}
}
private:
/*const*/ char * /*const*/ _p1;
const char * /*const*/ _p2;
};
```
https://godbolt.org/z/8Ezn63az5
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs