[clang] [clang-format][NFC] Use `prog` in clang-format-diff.py (PR #74399)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 4 17:38:29 PST 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-format
Author: Owen Pan (owenca)
<details>
<summary>Changes</summary>
This is a minor improvement to #<!-- -->73491.
---
Full diff: https://github.com/llvm/llvm-project/pull/74399.diff
1 Files Affected:
- (modified) clang/tools/clang-format/clang-format-diff.py (+1-2)
``````````diff
diff --git a/clang/tools/clang-format/clang-format-diff.py b/clang/tools/clang-format/clang-format-diff.py
index b25ee8f433751..946e28163420d 100755
--- a/clang/tools/clang-format/clang-format-diff.py
+++ b/clang/tools/clang-format/clang-format-diff.py
@@ -37,9 +37,8 @@
def main():
- basename = os.path.basename(sys.argv[0])
parser = argparse.ArgumentParser(
- description=__doc__.format(clang_format_diff=basename),
+ description=__doc__.format(clang_format_diff='%(prog)s'),
formatter_class=argparse.RawDescriptionHelpFormatter,
)
parser.add_argument(
``````````
</details>
https://github.com/llvm/llvm-project/pull/74399
More information about the cfe-commits
mailing list