llvm-project
32be90db - [emacs][clang-format] Add elisp API for clang-format on git diffs (#112792)

Commit
239 days ago
[emacs][clang-format] Add elisp API for clang-format on git diffs (#112792) New proposed function `clang-format-vc-diff`. It is the same as calling `clang-format-region` on all diffs between the content of a buffer-file and the content of the file at git revision HEAD. This is essentially the same thing as: `git-clang-format -f {filename}` If the current buffer is saved. The motivation is many project (LLVM included) both have code that is non-compliant with there clang-format style and disallow unrelated format diffs in PRs. This means users can't just run `clang-format-buffer` on the buffer they are working on, and need to manually go through all the regions by hand to get them formatted. This is both an error prone and annoying workflow.
Author
Parents
Loading