<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/58228>58228</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Consider using thousands-separator for large numeric values in diagnostics
</td>
</tr>
<tr>
<th>Labels</th>
<td>
good first issue,
clang:diagnostics
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
tbaederr
</td>
</tr>
</table>
<pre>
Consider:
```console
array.cpp:21:15: error: constexpr variable 'm' must be initialized by a constant expression
constexpr int m = 100'000 * 1'000'000;
^ ~~~~~~~~~~~~~~~~~~~
array.cpp:21:27: note: value 100000000000 is outside the range of representable values of type 'int'
constexpr int m = 100'000 * 1'000'000;
^
```
Since the diagnostics are going to be read by humans, I think it could be useful to use a thousands-separator when displaying large values, in this case `100000000000`.
I'm not sure if a local-dependent one or simply a programming language dependent one make more sense.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJytVM2SmzAMfhq4aDYDJiTkwGH_MrPnPoHAAtw1NuOfbdOnrwzNbnanp049RgbL-iR9kumsvLSP1nglyWXVfVY8ZcVVHopt9qy3mrZddA4vu35Z-LQoWZQ1CyDnbAKAdDjQz8XBGzqFnSbIxHHmB-boA3QEyqigUKtfJKG7AG42aAIkO_JeWbM5-wBTrJ0hq56gLAoGK4qCce-h3N7_yOphs4NPI6ufkzw-_-P8e97imNI1NlBa31BHSrG9D1AebAyJWQgTgUMzEtgBHKUkyYSVnNXQp_1wWVauOFWW_5OAL2R8Ke_2-U2ZfgtUKhyN9UH1HtARjFaZEYJNpXOEa82mOKPxmXiEF7ZR5hVU4DJGLdOp6GmIOpnwG9c3TDZ6NNLfeVrQYbAOfkxk2JVfNF4SvkY3XtlIuMokYA89MgRHeUstf-5uO_UldVgqBfjIAauBfWrbo76TtJCRzDVYw-Q78GpedOq5xdnR4Txvvs0Ykd1_Pj7jKwvLiFwtT59c3sqc2vJwqMt9UzVlLttKnqoT5kEFTe-Xi6lYafwLFQM_W_omzuRUf20KZW6LkUen2ymExaeLKs48RxWm2O16y_frrPXbdbnj7L5Tz310Vt6vjJ7rRogmn9p9eSrpSHs6UTMUp5PkuT9Q0zSy6Q9yyDV2pH2b1Q-ZEKO1Egbl-OauSLyVqsNLn1jjSG4iTMr6KVetKITggh3LqqyKctcd6tMgpBR1KamUVbYvaEaldynWnXVj7to17C6OnpVa-eA_lMh_hNEQrSExPkZm0bWhQ2JiXb4G1q75_QZsjncr">