[LLVMdev] lld coding style

Renato Golin renato.golin at linaro.org
Tue Oct 7 09:16:12 PDT 2014

On 7 October 2014 16:05, Zachary Turner <zturner at google.com> wrote:
> Not sure I understand.  How would reformatting the code change the
> semantics?  Why would something that used to work no logner work with a
> re-written history?

I didn't say it would change semantics, just that things could stop
working and they wouldn't be tested.

Things like external patches (you'd have to re-format everyone else's
tree, too). Or, as Tim said, variable names with _foo could have had
undefined behaviour and no one noticed, but that's what made it work.
That is, assuming the refactoring program has no bug at all.

If the tool has any bug, applying on such a large set of patches (not
just a big tree, but the whole history of a big tree), we'd be hitting
bugs a lot more likely than just the HEAD. We wouldn't test it (you
just can't repeat the tests that were made publicly and privately),
and whomever depends on those trees, wouldn't just have to format
their own trees, but re-validate everything they did in the past, or
trust clang-format to do a *perfect* job... I don't.

IMHO, doing it slowly is important, doing it all at once is risky but
doable, but re-writing history would be folly.

How slowly would depend on lld developers, but it shouldn't be faster
than they can validate it.


More information about the llvm-dev mailing list