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

    <tr>
        <th>Summary</th>
        <td>
            Initialization of a static member matches to TypeLoc instead of ElaboratedTypeLoc
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          marcin-szmagara
      </td>
    </tr>
</table>

<pre>
    When traversing following code with RecursiveASTVisitor, `S::` gets matched to `TypeLoc` and `n2::S::` does not get matched to `ElaboratedTypeLoc`. Expected behavior is matching `ElaboratedTypeLoc`.

```C++
namespace n2
{
  struct S
  {
    static int x;
  };
};

int n2::S::x = 0;

int main() { }
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx1Uk1v2zAM_TXyhWggy1_xwYe06YABOy3FdqZlxtZgS4EkJ2l__SQnWdpuAwiZ1OPH45Nb0702PwfS4C0eyTqle9ibcTSn6EnTEZyUH-A7yTmgR9rsXn4op7yxTDwBK_mOZZtoJYeevIMJvRyoA28i-vJ6oG9GRhR1F2-0uBS8q-sMOdDGxwaf6p9HbI1FT9290wqezweS4Q5aGvCojAV1HRxZ_6-M8S3jm-tZ8os9MfEYbbnVOJE7oCQILC951RUCcN7O0sPuFr-DIoheSVDaw5llj_ec7Z_og7-cMfuTHGdg2Rb4PxInVJqJNRN1nLx0_rhJQk1almlapUXFk67JujqrMfHKj9R81corHNVboGk0mD3gjfNEU0v2qruLul81C9s4T9jF7L8ETWY7NoP3BxeJiy_B-vCjzO1KmikE43i8fR4O1vwK7xVC5dxMLjhFJaoqGZpU1oXAjOfdukgJy7SS633e5TUVlGFbJ2Euja5hRXgloekES4vgs2KbqEZwIfhaiFRkouAr0ba5xDpr03wty_2e5ZyCcOMq8lgZ2ye2WSi1c-8COCrn3R1E51SviZZxoT_OfjC2mdBKpR_c24Q9WkwWCs2ywm-c-fy1">