<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/78167>78167</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang] Incorrect source range for `CXXParenListInitExpr` inside `CXXFunctionalCastExpr` with one spelled init
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
tomasz-kaminski-sonarsource
</td>
</tr>
</table>
<pre>
The locations for `CXXParenListInitExpr` inside `CXXFunctionalCastExpr` with a single argument are incorrect, and point to type and parent:
```c++
// v v - expected
auto x1 = Aggregate(1)
// ^ ^ - current.
```
This works correctly if more than one argument is spelled:
```c++
auto y1 = Aggregate(1, 2);
```
Or in case of variable initialization:
```c++
auto x1 = Aggregate(1);
```
Life example: [Godbolt](https://godbolt.org/z/oW6oMzsdf)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysk0uPozgQxz-NuZQSGRMeOXDIo1m11KvdQ0vbV4MrUNvGRrZJJ_n0IyA9j1aPZg4DBoRd5fpVuf7Se2oNYsnSPUuPkRxDZ10ZbC_9bfUqezL-lVbeGum8HV2DUW3VtXzuELRtZCBrPJysA5bxw8vLv9KheSIfHg2Fh8vgWMaBjCeFd4tqNM3kJfVB-q8mbxQ6kODJtBpBunbs0QSQDoFMY53DJjBxAGkUDJZMgGAhXAdcZqaogSU7xo-M71jGl9EwsZ_GMisqJio4wxlWgJcBm4BqWZJjsHCJgSVHgF3bOmxlQCaKmIntD97vF0sf5gdgBc3opvDrD8GX3-eOPLxZ9-rhnoa-Ap2gtw4hdNKANd8lTB78gFqj-kU2E8SMfV2wP1AfQEzoyf5TqH8ckIFGegR7grN0JGs9VZoCSU23-Vh_F-DyKcBPYy_vJzoh4EX2g0aW7ICl-7-sqq0OLD0yUXQhDH4imMveLktr61omqhsTlf0vs3_fvDoxsY1UmahtspURlnHO0ySJ85hHXbnlmYrjLeYnhTnfJHVeKLkpMC_UpoiFiqgUXGx4HKfzzddcYJYnTXEqiqyo04ZtOPaS9Frrcz-Fj8j7Ecu8iLM80rJG7WfpCNFoaVomxKQiV072q3psPdtwTT74bzsECnrW2-KRHuHxvcNhkRg4aVr8A6paZDU12L2p5iOORqfLDwWm0I31urE9E9VEev-sBmf_n6VXzYl7Jqo59y8BAAD__1Y4SJo">