Issue |
127583
|
Summary |
[clang-fornat] -style=Google vs .clang-format produces different output
|
Labels |
clang-format
|
Assignees |
|
Reporter |
xavgru12
|
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
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs