Hi All,
I’ve been noticing that clang-format either seems to be non-deterministic or there is a difference between “-i” and “-output-replacements-xml”.
I.e. if you do:
$ clang-format -style=file -i source_code.cpp
$ clang-format -style=file -output-replacements-xml source_code.cpp
The second command outputs replacements…
Should I file a bug for this and if so, where?
Bram
There is nothing non-deterministic about this, the behaviour is well-documented if you say “–help”:
-i - Inplace edit s, if specified.
-output-replacements-xml - Output replacements as XML.
Bram De Jong via cfe-dev <cfe-dev@lists.llvm.org> ezt írta (időpont: 2018. dec. 3., H, 11:30):
What I meant is that
- running formatting first ( -i … )
and then
- running -output-replacements-xml afterwards, with exactly the same config
Should not give any replacements in -output-replacements-xml.
Or, am I wrong in assuming that?
Bram