<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/62045>62045</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Enhancement idea to provide clearer missing brace line number
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
jonnygrant
</td>
</tr>
</table>
<pre>
Could clang suggest the missing brace on line 5? If it knows the [2] elements of the array row ?
Note, this isn't real code, it's just an example to demonstrate the issue. Sometimes there are tables with 200 rows, so it takes time for programmer to manually find the missing closing brace.
I expected something like this
```
<example message>:5:14: error: expected '}' before ','
{"E", "F",
^
```
https://godbolt.org/z/Ydxx5hdT8
```
static const char * list[][2] =
{
{"A", "B"},
{"C", "D"},
{"E", "F",
{"G", "H"},
{"I", "J"}
};
int main()
{
}
```
This was the godbolt output from clang trunk
```
<source>:8:2: error: expected '}'
};
^
<source>:2:1: note: to match this '{'
{
^
1 error generated.
Compiler returned: 1
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEVEuTqzYT_TXNpuu6QDLGXrDwY_x9k0U2uZssBWpAM3q4JHE9k1-fEuDY18kkVS6Zx9HROc3pFiGo3hLVUB6gPGVijIPz9Zuz9rP3wsascfKzPrpRS2y1sD2Gse8pRIwDoVEhKNtj40VL6CxqZQlL4Gd87VBFfLfuGiYolAcG5QlJkyEbA7puei68F5_o3RWBnyE_Qb6f119dJGBHjIMKqIIFVkX0JDS2Tk5vVARWBXwbQ0RhkT6EuWjC6FCScTZELyJNh6gQRlrhb85QVIYmRT6dTRhFoyngVcUBWZ4nJSGRB5f0R_Ge0MoQds7jxbveC2PIp1OMsKPQ-hM7ZeVP9Wi1u9dl9ejqFenjQm0kiSGpGRJMq3eafT5CYZMvv_mWH28ODYUgegL-AnxfAt8Xa-B7JO-dny5uRwCroDoBq7ChznmaHrBjWidOhOoAjL0AY8kzMHaeL2-vy5d_1DLEeAnA95Dw597Jxum4cr4Hdv4D2Pl3-fFRDvL79l_8hCiiarFNHwrbQXgEtketQpyzeAsM8NOyvzosshAX4fu78HQ7eT0-g4530OlL0Jcl-Avxvzvi_1_SvN5BvyygRfsJ-OGxGspGNEJZYFtguyeH931PGZjW7ykpVzH31VJ8dGO8jBE778zSqNGP9v2rKAU3-nZJ0Bb4nv1HgP5u4yEcP9MlqiKx2NTBfD-3SmyHJeKJ8vBAefN8oytmHdiTpdTBcmmgozMXpcmjpzh6SzJxF08GM1lzueM7kVFdbLZFwTjLN9lQd82G5G5b0q7M24qKrinX227LN63cNEW5zlTNcsbzdZEX-TrPN6tqt-Wio4JV20LuCgbrnIxQeqX1D5PCnk1jpd6wfF1mWjSkwzRHGbN0nWdOykB5ynyd9nxrxj7AOk8ZD3eWqKKm-sUOwrbTbEQlSaSqXbz7oSRhq0l48k_jdpq1djQN-Wz0un5qShWHsVm1zgA7p7OWv28X796ojcDOk8IA7Dw5-DMAAP__baq6ag">