[llvm] workflows/pr-code-format: Run the in-tree git-clang-format (PR #219834)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 30 11:43:03 PDT 2026


https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/219834

The container installs git-clang-format from an LLVM release tarball, so
a script fix (#215946) requires an in-tree script.
git-clang-format only uses four options from clang-format.


>From fecb2eb148823aa9d4a1e93c467468d20702c5a8 Mon Sep 17 00:00:00 2001
From: Fangrui Song <i at maskray.me>
Date: Wed, 12 Aug 2026 22:39:50 -0700
Subject: [PATCH] workflows/pr-code-format: Run the in-tree git-clang-format

The container installs git-clang-format from an LLVM release tarball, so
a script fix (#215946) requires an in-tree script.
git-clang-format only uses four options from clang-format.
---
 .github/workflows/pr-code-format.yml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.github/workflows/pr-code-format.yml b/.github/workflows/pr-code-format.yml
index 89062a8a5b1be..63e148d40e7ae 100644
--- a/.github/workflows/pr-code-format.yml
+++ b/.github/workflows/pr-code-format.yml
@@ -46,6 +46,9 @@ jobs:
         env:
           GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
           CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
+          # This runs a release ahead of the pinned clang-format, so it must
+          # not use newly added clang-format options.
+          CLANG_FORMAT_PATH: ./clang/tools/clang-format/git-clang-format
         # Create an empty comments file so the pr-write job doesn't fail.
         run: |
           echo "[]" > comments &&



More information about the llvm-commits mailing list