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

    <tr>
        <th>Summary</th>
        <td>
            No code completion for member access operator when array-to-pointer decay is performed
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clangd,
            clang:frontend
      </td>
    </tr>

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

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

<pre>
    $ cat test.c
```
struct my_foo {
  int a;
  int b;
};

struct my_foo arr[1];

void func() {
  arr->
}
```

$ clang -cc1 -code-completion-at=test.c:9:8  test.c 

If I declare `arr` as `struct my_foo *arr;`, code completion succeeds.

$ clang -cc1 -code-completion-at=test.c:9:8  test.c 
COMPLETION: a : [#int#]a
COMPLETION: b : [#int#]b
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJysUsGOmzAQ_ZrhMiIydiBw4EA2G2mldreH3quxGRK3gCPbbJW_r5yljbrbY6UR8DTDm_dmhkKwp5m5hXIP5SGjJZ6db-lMkWb6kWnXX1uQWzQUMXKIGwOig0qsIboQ_WIiTtdvg3MIuz2IDtHOEQnUHeg3ALvD-vH-T_Ieyn0B5b3g1dkeh2U2IGuQzR9y8j4H9bjS_S0nRZI70nzC3JgCc-N6zo2bLiNH6-acIqjD6kV1DaiuxtUbvjE8DfiEPZuRPCNUImmrBFJI4J1h2aWs2qf28gFTM7w3w7AYw9yHzX_R9vDy-cunx69PL8-gOiRMz7Q5qewcQSooD_ShTP-rTGd9q_pGNZRxW-xU1dRlo-rs3DJXu10l-kH3XAmWTcGl1tw0pR4KUcvMtlLIUhRFJYQoVb2pB-oLIXQhtkWliWAreCI7bsbxddo4f8psCAu3hVTFtspG0jyG28VJeRtGD1KCfPgNQXWDd3Pk-ZYoD5lvE1Wul1OArRhtiOFOHm0cuX12H2Y_OI8TT5o9kjEcAroLe4rO488zz-mO6JpHl1-cnSP7tHK6og14YT84P3GfLX5szzFeAqgO5BHk8WTjedEb4yaQxyRifeUX776ziSCPN7sB5HF1_NrKXwEAAP__wa0HQg">