aboutsummaryrefslogtreecommitdiff
path: root/clang/tools/clang-format/clang-format-diff.py
diff options
context:
space:
mode:
authormagic-akari <akari.ccino@gmail.com>2024-08-22 00:22:21 +0800
committerGitHub <noreply@github.com>2024-08-21 18:22:21 +0200
commit625841c3be4dbaab089c01217726a2906f3a8103 (patch)
treed5fc92cb21b1d070aa4355843015a36e522f6f5e /clang/tools/clang-format/clang-format-diff.py
parente49068624c48f4d906707b32b31f6a1d561605be (diff)
downloadllvm-625841c3be4dbaab089c01217726a2906f3a8103.zip
llvm-625841c3be4dbaab089c01217726a2906f3a8103.tar.gz
llvm-625841c3be4dbaab089c01217726a2906f3a8103.tar.bz2
[clang-format] Use double hyphen for multiple-letter flags (#100978)
- Closes: #100974
Diffstat (limited to 'clang/tools/clang-format/clang-format-diff.py')
-rwxr-xr-xclang/tools/clang-format/clang-format-diff.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/tools/clang-format/clang-format-diff.py b/clang/tools/clang-format/clang-format-diff.py
index 3a74b90..9eec0f3 100755
--- a/clang/tools/clang-format/clang-format-diff.py
+++ b/clang/tools/clang-format/clang-format-diff.py
@@ -134,7 +134,7 @@ def main():
if line_count != 0:
end_line += line_count - 1
lines_by_file.setdefault(filename, []).extend(
- ["-lines", str(start_line) + ":" + str(end_line)]
+ ["--lines", str(start_line) + ":" + str(end_line)]
)
# Reformat files containing changes in place.
@@ -146,12 +146,12 @@ def main():
if args.i:
command.append("-i")
if args.sort_includes:
- command.append("-sort-includes")
+ command.append("--sort-includes")
command.extend(lines)
if args.style:
- command.extend(["-style", args.style])
+ command.extend(["--style", args.style])
if args.fallback_style:
- command.extend(["-fallback-style", args.fallback_style])
+ command.extend(["--fallback-style", args.fallback_style])
try:
p = subprocess.Popen(