<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/63903>63903</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Invalid SourceLocation used for default member initializers in Parenthesized initialization
</td>
</tr>
<tr>
<th>Labels</th>
<td>
c++20,
clang:frontend
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
cor3ntin
</td>
</tr>
</table>
<pre>
```cpp
#include <source_location>
struct S {
int _;
int i = std::source_location::current().line();
};
static_assert(S(0).i == S{0}.i);
```
https://compiler-explorer.com/z/5TnMjYEGr
The assert fails because `BuildCXXDefaultInitExpr` gets the wrong source location in the case of a paren init.
To be consistent, it should get the location of the right paren.
This affects both `source_location` and diagnostics
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxkkl1vqzgQhn_NcDNq5NgBwgUX-WhWlXalldKL7lVl7AFcOTayTbenv_4ISPp1JGTMa_zMzDsjYzSdI6oh30N-zOSYeh9q5YNwybis8fpXDQVbHjUMwI7AdteVC-OUHTUhiEP0Y1D0bL2SyXgH4v7rvzGFUSU8I5T7RUFENC7hM4gfikEQR4xJg9iB2P0BnkQ1hkAuAd8Cr1bWOFq2HzAoj5_7awoyGfUsY6QwXTwD37Lp9hxvCnmGcs-gPK7MN9Ky3kz4KvYpDXFKiJ-An5S_DMZSuKO3wfpAYaX8BfjpHfgpf3T_vPx3_1f4xpzXx55wSQpbaWzEhpQcIyEUbD8aqw9PT0dq5WjTgzPp_m0IUDDsKEVMPeH_wbsOF5fw5hIaNx8qGQl9ixIHGWiSTVpd43psCJV30cQ0e3lAkzD2frR6ws-AD6Bv5-9guj4tsBunNxFl25JKERuf-inxn00rGEqnURvZOR-TUTHTtdCVqGRG9brYVvlWbEuR9XVRKFKyyUm0lRB5pZqc62pT5DoXpcjLzNScccHKdcm2-XotVpqavOAFLxVtdM5K2DC6SGNX1r5eVj50mYlxpLoQFROZlQ3ZOE885wr4HvieM-Ac-GFSrHQdiF0bvEvk9HSQH7NQT7C7ZuwibJg1McVPfDLJUv3gXqU1Gs9z7X_fjBsjaWx9QL00ES90aSjMrTDSmncKcWrXv5Onqado3kl_ni6QbAy2_j5unUn92FxnbErl-robgn8hlYCf5rIj8NNc-e8AAAD__2zAOUk">