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

    <tr>
        <th>Summary</th>
        <td>
            [Clang Diagnostics] [C++] Fixit suggesting dereferencing a `T*` to call a `T` constructor should be on a seperate line
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

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

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

<pre>
    https://godbolt.org/z/cTd9YMY87

```c++
struct X {
    constexpr X(int) {}
};

int* p;
X x = p;
```

```c++
<source>:6:3: error: no viable conversion from 'int *' to 'X'
    6 | X x = p;
      |   ^   ~
<source>:2:15: note: candidate constructor not viable: no known conversion from 'int *' to 'int' for 1st argument; dereference the argument with *
    2 |     constexpr X(int) {}
      |               ^ ~~~
    3 | };
    4 | 
    5 | int* p;
    6 | X x = p;
      |       *
```

If there was more between the constructor and the initialization the fixit to add a `*` doesn't even show up.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMVMGO4ygQ_ZrKpTSRXcSxffDB3ZlIe5jbHHqO2JRtdghEgJPeOfS3r3C86ez0StsIGXiUi1ePomQIerTMDRRPUBw2co6T8803HaVpw-R-bjqn_mqmGM8BRAt0BDqOTnXOxK3zI9DxF9Cx_67qH99-VCVkB8ja9bvPbr0Hekp9QUP0cx_xBaFcEUTE3tkQ-fXs8QWo0jYC1YtFeVidlQcQT4_uF6MWz3f4BV8RxOEBuTP4f1ognoObfc8gvoJo9yBaAaJF9t75NLEOL1p2hhPXC_ugncXBuxMCldpGBGqBSowuAS9A5Xt0e4TyGT_yw6WlPUQoviLi23-yIRBtXtxYRE5jL63SSka-KZckdT7triRXxj-tu9pPEV7ULHFwHvMQUfpxPrGNIJ5QseeBPdueMU5838OrjtPi5R4MrcF84kIfY39sSYe3t7d3I7EYPd5_Qnc39L4ulvWHnPis-suMfs-Qx7T5Y0jBe8arDHhynrHjeGW2iyaPtyCtWjBtddTS6F8yJukTNOhXHZPiUimUmI6gdBwqx8EClRH5whbD5K44n7cb1QhVi1puuMnLvKK83O2KzdR0mewHqrMhk7tCdaTysqRe5Wog1df7YqMbymiX7XPKK1FSsd1XXbXPejVUtaBa5LDL-CS12RpzOaWnvNEhzNzUBVXVxsiOTViqAlFvpB2BKBUI3yT7L908BthlRocY3j1EHc1SSp7TH3jQcrQuRN0HKA6Y8PXJFQc8LlKEeRw5RG3HhzRLq0Wc76s60WEvjfkH3Gf_0jtMbjYKO0ZnUWLgM_v0Moy2vJm9-b166TjN3bZ3J6Bjor4OX87e_cl9BDouSgSg402MS0N_BwAA__9TB3gQ">