<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/127583>127583</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-fornat] -style=Google vs .clang-format produces different output
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-format
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
xavgru12
</td>
</tr>
</table>
<pre>
configure .clang-fornat:
clang-format -style=Google -dump-config .clang-format
Option 1:
clang-format -i file..cpp
Option 2:
clang-format -style=Google -i file.cpp
does not produce the same formatting.
example file.cpp:
```
ExecutionProfiler() :
timeCaptureMeasure_(), timerAccess_(NULL), captureTimer_(0UL), capturePeriod_(0.0F), captureCount_(0UL), loopCount_(0UL),
lastLoopCount_(0UL), minLoad_(1.0F), maxLoad_(0.0F), loopMaxCount_(0x003FFFFFUL),
initalized_(false), reset_(false), idleDaemonActive_(false), updateInprogress_(false)
{}
```
Result with Option 1: no formatting changes
Result with Option 2:
```
ExecutionProfiler()
: timeCaptureMeasure_(),
timerAccess_(NULL),
captureTimer_(0UL),
capturePeriod_(0.0F),
captureCount_(0UL),
loopCount_(0UL),
lastLoopCount_(0UL),
minLoad_(1.0F),
maxLoad_(0.0F),
loopMaxCount_(0x003FFFFFUL),
initalized_(false),
reset_(false),
idleDaemonActive_(false),
updateInprogress_(false) {}
```
using:
clang-format version 19.1.5
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyMlV-PojoYxj9NuWkkpYjoBRfOeDw5iXN2stm53tTygt2UlvSP6-yn3xQZRQfcJSYmfZ_neSn8eMusFbUCKFD2hLJNxLw7aFOc2LE2PqHRXpfvBdeqErU3gGMumapnlTaKOZSuEVlfVhrm8My6dwko3fyrdS0Bz0rftLOzf2BumEMkmL-0TmiFk7EogSshIY55296I6d_07c0Xb6nBYqUdbo0uPQfsDoAtawCfE5xQdXyWwok1rYRrQNcOLUj_I2uM_zkB9-FuXo0OOoPoEtEVPmuxEw08s9Z5Ay_ArDfw_SxA9LkrmjXnYG1Y_f9tt-sr_Gz5FgShRN7uKq9ghC67Uky2t7Vn7ZW7dUmt28_L4QYls243WsWNUDvNuibJtUnDTh-rg9ahwQs7XVNOhKTbcF3iuseFsVDCMSl-QRdRMWmhFxiw4O4XRSlhw6DRas2dOMJ93bclc_Cfao2uTf8gL_XQEeVPKN_cvTdE1l_BeunwT-EOeAAfVnoAAuYHpmqwkxY6wsQEEv3-cUDjIRcf3IyicUnB05AEzQNOPkdMoDEJTX9NszMQjVIU6qMgDdP_iFQQT-I0SBoDq_M-ZmuQ8IiyScK8FaoOL_t-Rh3B2I63VZzEWVQWablKVyyCIsnT1XIxny9IdCjYglOY8zQlNE0WebZcZRzyFd9XC5JyziNRUEIzQpMlyecJIfGewH5JgFZlmedlztGcQMOEjKU8NrE2dSSs9VAkNM-WaSTZHqTtBj6lNyOZ0nAEmCL4ZntfWzQnUlhnr0lOONkdFjcHQbb5NIGP9nbefwxei0tRVWBAOay9a72LvJHFwbnWhq-KbhHd1sId_D7mukF0G3r3f7PW6B_AHaLbbksW0W2_q2NBfwcAAP__qb8SMw">