[clang] [clang-format] Add null-terminated path option (#123921) (PR #123926)
Nikolaos Chatzikonstantinou via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 22 17:15:45 PST 2025
================
@@ -869,5 +875,12 @@ def convert_string(bytes_input):
return str(bytes_input)
+def print_filename(filename, null=False):
+ if null:
+ print(filename + "\0", end="")
----------------
createyourpersonalaccount wrote:
I don't think so, because indentation is meaningless in binary output. You want to feed this to a program like `xargs -0`. This is useful when you want to pipe the binary data of a list of filepaths as-is to a tool. Adding tab characters in there would only confuse and make it necessary to crop the tab characters before piping it.
https://github.com/llvm/llvm-project/pull/123926
More information about the cfe-commits
mailing list