Update formatting to use the LLVM style.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
compiler-rt/lib/builtins/lshrti3.c | ||
---|---|---|
31 ↗ | (On Diff #193991) | clang-format interacts poorly with some of the comments in these files. Maybe look through the diff yourself locally, there's a few places that could use manual cleaning up. |
I'd much rather see format updates happen as the files are touched, instead of all-out like this, because it makes mergebots sad.
Huh, usually the guidance is "land reformat in a separate commit". And we've mass-reformated code that didn't follow LLVM style before, e.g. lldb. What's different here?
Do you intend to change all these files in the near future? If we want to go by guidance:
"Avoid committing formatting- or whitespace-only changes outside of code you plan to make subsequent changes to. Also, try to separate formatting or whitespace changes from functional changes, either by correcting the format first (ideally) or afterward. Such changes should be highly localized and the commit message should clearly state that the commit is not intended to change functionality, usually by stating it is NFC." from https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access
Agreed that format changes should happen as NFC commits, but I'm just not a fan of commits that just do that because the code is "wrong". Unless there's subsequent changes coming to each file, it's useless churn that hurts mergebots and makes the history annoying to follow.
Not that this is "over my dead body". I'm just asking if the motivation is just "oh hey it's wrongly formatted, let's fix the format". If so, I'm not a fan. I'd much rather fix code as we change it.
Thanks @echristo for pointing out "[RFC] compiler-rt builtins cleanup and refactoring". You do intend to modify this code, so a reformat ahead of time is then fine. Please link to the RFC in the commit message.
compiler-rt/trunk/lib/builtins/arm/sync-ops.h | ||
---|---|---|
37 | It looks like this reformatted to illegal assembly: compiler-rt/lib/builtins/arm/sync_fetch_and_add_8.S:21: Error: bad instruction `push{r4, r5,r6,lr}' The whitespace between push and { likely needs to be preserved. |
It looks like this reformatted to illegal assembly:
The whitespace between push and { likely needs to be preserved.