[clang] [clang-format] Exit clang-format-diff only after all diffs are printed (PR #86776)

2024-07-28 Thread Philip Chimento via cfe-commits
ptomato wrote: Could this be backported to clang-format 18.x? It's a really inconvenient regression. https://github.com/llvm/llvm-project/pull/86776 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [clang-format] Add ability for clang-format-diff to exit with non-0 status (PR #70883)

2024-07-28 Thread Philip Chimento via cfe-commits
@@ -185,6 +191,8 @@ def main(): diff_string = "".join(diff) if len(diff_string) > 0: sys.stdout.write(diff_string) +if args.non_zero_exit_code: +sys.exit(1) ptomato wrote: A valid use