[clang] [clang-format] Add null-terminated path option (#123921) (PR #123926)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 24 02:56:13 PST 2025


================
@@ -205,6 +205,12 @@ def main():
             "commits"
         ),
     )
+    p.add_argument(
+        "-0",
+        "--null",
+        action="store_true",
+        help="print the affected paths with null-terminated characters",
----------------
mydeveloperday wrote:

if you plan on dropping other text output (which I think perhaps you should other wise it needs to be grep -v'd or tailed to make it work correctly, I would perhaps rather we had a better named command line switch than -0 or --null

I know this is likely how xargs or find works, but I think we can do a little better than those tools in terms of clarity.

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


More information about the cfe-commits mailing list