[llvm] [Github] Bump clang-format to 21.1.0 (PR #155660)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 28 07:25:04 PDT 2025


https://github.com/boomanaiden154 updated https://github.com/llvm/llvm-project/pull/155660

>From 95cfc652ed9e9bf3e82e5ad4b5e7c1aeaf4ec573 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Wed, 27 Aug 2025 17:19:47 +0000
Subject: [PATCH 1/2] [Github] Bump clang-format to 21.1.0

This patch bumps the clang-format version in the pr-code-format action
to the latest release version, in line with how we have handled this
before.
---
 .github/workflows/pr-code-format.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/pr-code-format.yml b/.github/workflows/pr-code-format.yml
index 5540555ae05ed..3089debbdbc2f 100644
--- a/.github/workflows/pr-code-format.yml
+++ b/.github/workflows/pr-code-format.yml
@@ -55,7 +55,7 @@ jobs:
       - name: Install clang-format
         uses: aminya/setup-cpp at 17c11551771948abc5752bbf3183482567c7caf0 # v1.1.1
         with:
-          clangformat: 20.1.8
+          clangformat: 21.1.0
 
       - name: Setup Python env
         uses: actions/setup-python at 42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0

>From aca1a3bdaf454a9df9e4bb7bc702e423504d7992 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Thu, 28 Aug 2025 14:24:51 +0000
Subject: [PATCH 2/2] Add comment

---
 .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 3089debbdbc2f..9341eaf3ce7c2 100644
--- a/.github/workflows/pr-code-format.yml
+++ b/.github/workflows/pr-code-format.yml
@@ -52,6 +52,9 @@ jobs:
           echo "Formatting files:"
           echo "$CHANGED_FILES"
 
+      # The clang format version should always be upgraded to the first version
+      # of a release cycle (x.1.0) or the last version of a release cycle, or
+      # if there have been relevant clang-format backports.
       - name: Install clang-format
         uses: aminya/setup-cpp at 17c11551771948abc5752bbf3183482567c7caf0 # v1.1.1
         with:



More information about the llvm-commits mailing list