[Openmp-commits] [PATCH] D95318: [OpenMP][NFC] Format all files in OpenMP
Johannes Doerfert via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Sun Jan 24 16:20:53 PST 2021
jdoerfert added a comment.
In D95318#2518566 <https://reviews.llvm.org/D95318#2518566>, @AndreyChurbanov wrote:
> I am afraid such action may be needed regularly, unless we freeze the clang-format version and write it in the documentation.
> Because each version of clang-format may produce different result of formatting, unfortunately.
> At least that was the case couple of years ago.
I propose the following:
1. Clang format the repo, or parts of it (libomptarget for example) [optional!]
2. From now on forward, require each patch to be clang formatted, with `git-clang-format` or similar.
3. If it is beneficial for a specific piece of code to be formatted explicitly before a diff is applied, do so in a NFC pre-commit.
4. If we went with 1., we can from time to time redo 1. but from my experience with the Attributor this is mostly necessary because 1) was violated.
We *should not* freeze the clang-format version. We *should* write it in the documentation if we require 2), as we *should* write that doxygen comments are necessary and LLVM formatting is preferred. If a difference in formatting is from clang-format changes, rule 3. might apply but that is arguably not a problem.
I guess we should bring this up Wednesday.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95318/new/
https://reviews.llvm.org/D95318
More information about the Openmp-commits
mailing list