Issue |
143600
|
Summary |
False positive for `-Wunused-private-field` with deduced explicit object parameter
|
Labels |
new issue
|
Assignees |
|
Reporter |
rohanlean
|
The following C++23 code gives a warning with `-Wunused-private-field`:
```
struct S {
int f(this auto self) { return self.x; }
private:
int x;
};
```
This one does not:
```
struct S {
int f() { return x; }
private:
int x;
};
```
And neither does this:
```
struct S {
int f(this S self) { return self.x; }
private:
int x;
};
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs