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

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 8 13:08:29 PST 2023


================
@@ -95,6 +95,12 @@ def main():
         default="clang-format",
         help="location of binary to use for clang-format",
     )
+    parser.add_argument(
+        "-non-zero-exit-code",
+        action="store_true",
+        default=False,
+        help="exit with a non-zero status if formatting changes are necessary",
+    )
----------------
owenca wrote:

```suggestion
```

https://github.com/llvm/llvm-project/pull/70883


More information about the cfe-commits mailing list