<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/56777>56777</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            `misc-const-correctness.WarnPointersAsValues` not reported when accessed through `->`
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          firewave
      </td>
    </tr>
</table>

<pre>
    ```cpp
class A
{
public:
    void f();
};

extern A* cb1();
extern void cb2(A*);

void f()
{
    A* a1 = cb1(); // no warning
    a1->f();

    A* a2 = cb1(); // warning
    cb2(a2);
}
```
https://godbolt.org/z/qde3M79fY
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx1UsGOmzAQ_RpzsRIZEwwcfEiU7q1ST616NGYArxyb2iZp-_UdYKMoWRWZ8Qwz8-b54dZ3fyQRbFt6mgg7E3bUVsVIj1tAqtPmTHNrjSbFx3eKz9WbjvaE14Q3pDjdG84Pf7XwO0FwCMiPVLf5S_1HdsXSLcfsUviEuNqnYc_UFi4rusopKc5PQyjhb7io8_SmgjNuePSofEeKL58O8ILJ_4v5CXDjr_irHptzF3oLx5SmuMi5Yg2-a71Nex8GjP7i-6uD4mvV9D8zkLkoG5YzVtRZJ4uuKRqVJZMsLH_vYqLeae9iQhsC6OQgxv0PJPfNG4fqxmP8ruwMEatRiEQDTD4k6OhtBEeV1tiAURqDn4eRYtkiDG7ZHKx8YWrSOLd77S8YWHu9b7sp-HccjqGJcRnG30pRVVU2SmgFMM67supFJVjTiFqoQ18XugGomcisasFGScoT4dzBja4Q6JPynBnJsZlVvM7R5tWeNVyrMs8PVSlyKGpyYHBRxu4XHouEWZArpXYeIiatiSk-kni7zeAA1nGIr-Y0-iB7E-CmrpCts-XK_R8YFd_o">