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

    <tr>
        <th>Summary</th>
        <td>
            Correct Printing of Pointers and References to Vectors
        </td>
    </tr>

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

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

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

<pre>
    The order in which vector type elements are printed results in the `*` or `&` operand being placed such that it might be interpreted not as a pointer to a vector, but as a vector of pointers to the element type. See this [example](https://godbolt.org/z/jqa3d3n4K) in the diagnostic output and potentially follow this [discussion](https://github.com/llvm/llvm-project/pull/111415#discussion_r1795133310) that motivated the issue.

The solution is pretty simple and involves printing most of the vector elements in the `Before` function. This will impact a few tests that depend on the current ordering where, rather than the `__private` qualifier such as in this OpenCL [test](https://github.com/llvm/llvm-project/blob/main/clang/test/Index/opencl-types.cl).

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVMuO4zYQ_Brq0lhDoiTLPugwDwgIEiCLZJHrgKJaFjcUm0u27HG-PiBtz1xyyV5sUKKqqquKVDGak0PsRfss2tdCbbxQ6D1dpLZ_FyNN1_7bgkBhwgDGwWUxeoEzaqYAfPUIaHFFxxFUQPDBOMYJAsbNckxf8IIg9qWQT2JfAoXbYp8XHoNyE4xo3Am8VRoniJtegBfFYBhWc1oYRoQEG3zABO6IQUVQ4Ck_BiZQd01CvsC43d_fZdL82BnT1iToLjpPsIM_EYEXE0G0z_iuVm9RtK9CHhZmH0X9JOQg5HCiaSTLOwonIYd_hBy-_1D1VLvmVyGPj1kno06OIhsNtLFPWtwEnhgdG2XtFWayli4fjJOJeovRkPtPUsPLNu40rUIO1p4ff198oO-oWcjBb9YKOVRV1VStkPUn4FuoumNb1XVdlUlitnUlNmeVjExyTYwb7kT5Ksqn22_KO5Ld2JADEyG5zleIJvmShzHuTPaM8RZ3ym6lyMnnhHh3_aMXnx14xpkCpuTnzemEv4NvyYWLsRbM6pVmUDDjBRgjx5veCT26CegGo7cQUnK5kYn6smDAFHtQvKQyLOqD8O3Nhzxr4vyxKWtmg-FWMXVXZiL87tG9_JaySLQ_mcJoaRRyWJVxQg7aKpdakgHl8Iub8F3IgTw6bb-k2sWdtkIe79YXU19Px_qoCuyrri67tj42dbH0XavHea_muWtkK_eHsuqqtinbQ6tk1x33hellKZuqKhtZtsey3rWHUVatbPa1rLtq6kRT4qqM3SXBqbxFzryvquawPxRWjWhjvgCkdHi5NUJIme6D0Ocpx-0URVNaEzl-wrBhi_0LhYCa4eujCzTD18dxS235A2cM6DTm0_dXbkcstmD7_-1xlhZz17P2cy__DQAA__-0eJfg">