<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/75163>75163</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang-tidy check readability-static-accessed-through-instance does not diagnose accesses through smart pointer
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-tidy
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
sfc-gh-sgiesecke
</td>
</tr>
</table>
<pre>
The clang-tidy check `readability-static-accessed-through-instance` does not diagnose accesses through smart pointer, only through plain pointers.
e.g. in
```
#include <memory>
class A {
public:
static void foo() {}
};
class B {
public:
void bar() {
a1->foo();
a2->foo();
}
std::unique_ptr<A> a1;
A* a2;
};
```
only the access through `a2` is diagnosed, not the one through `a1`.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUU81uqzwQfZphMyKyxwkhCxZJ0zzBt_9k7An41rFzsamUt78ioflR1UURAuE5c8aH46NTcl1gbmC1g9W-0GPu49Ckoym7vkyd48Tmg4s22kvzX89ovA5dmZ29oOnZfCBUYmBtdeu8y5cyZZ2dKbUxnBLbMvdDHLu-dCFlHQxDJdBGThhiRut0F2JinOEJZzimkx4ynqMLmQegN4zBX-7Vs9cufFXTAsQexPb25EW3QBfmpUrM9-2TlAvGj5YR1NuJT3G4gHp_bjdep4RbhPXutoDnsfXOgJoBiIg3jfgZncVjjEA10Obast7PZOs9qN134t3PxA_6K2-rhyfee226tCxBvd8H3wehph8KiPjY2pMMO01X2zG4vyP_f84DqLctqHfU8qV5CzSxPyQ9y3v9x7NPX5beLYNKaJrMd-luu52Mnc7BhI-BX8ASKvHibGEbZTdqowtu5FqQWtdSVkXfcNXKelOvRE3tUmpNwlhVWV1txGrDUhauIUFKkiQplrWqFratqyXRio-KzJEVLAWftPML7z9Pizh0hUtp5Ga9kpUqvG7Zp2tCiB7nH4imxAzN1FS2Y5dgKbxLOT1ossuem2-Z-U1gfp2WYhx80-d8TpO7dAA6dC73Y7sw8QR0mDY3v8rzEP-wyUCHq-AEdLhq_hcAAP__nag6wQ">