[llvm] Tru/test cf (PR #65751)

Tobias Hieta via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 8 06:16:50 PDT 2023


https://github.com/tru created https://github.com/llvm/llvm-project/pull/65751:

None

>From 25f561aa65a7d2f350c837774d2dbc0719fa8c3d Mon Sep 17 00:00:00 2001
From: Tobias Hieta <tobias at hieta.se>
Date: Fri, 8 Sep 2023 15:11:53 +0200
Subject: [PATCH 1/2] Start clang-format

---
 .github/workflows/pr-clang-format.yml | 43 +++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 .github/workflows/pr-clang-format.yml

diff --git a/.github/workflows/pr-clang-format.yml b/.github/workflows/pr-clang-format.yml
new file mode 100644
index 000000000000000..269d86a60a762e5
--- /dev/null
+++ b/.github/workflows/pr-clang-format.yml
@@ -0,0 +1,43 @@
+name: "Run clang-format"
+on: pull_request
+
+jobs:
+  clang_format:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Fetch LLVM sources
+        uses: actions/checkout at v4
+        with:
+          persist-credentials: false
+          fetch-depth: 2
+
+      - name: Get changed files
+        id: changed-files
+        uses: tj-actions/changed-files at v39
+        with:
+          files: |
+            '**.c'
+            '**.cpp'
+            '**.h'
+            '**.cxx'
+            '**.hpp'
+
+      - name: "Listed files"
+        run: |
+          echo "Formatting files:"
+          echo "${{ steps.changed-files.outputs.all_changed_files }}"
+
+      - name: Install clang-format
+        uses: aminya/setup-cpp at v
+        with:
+          clangformat: 16.0.6
+
+      - name: Setup Python env
+        uses: actions/setup-python at v4
+        with:
+          python-version: '3.11'
+
+      - name: Test
+        run: |
+          clang-format --version
+          git-clang-format --version

>From 1644e55d3f8e42c973c09778f87aef0bf88902ce Mon Sep 17 00:00:00 2001
From: Tobias Hieta <tobias at hieta.se>
Date: Fri, 8 Sep 2023 15:16:22 +0200
Subject: [PATCH 2/2] Break clang-format

---
 llvm/lib/Support/APInt.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp
index 05b1526da95ff7d..c86047d71c39fd8 100644
--- a/llvm/lib/Support/APInt.cpp
+++ b/llvm/lib/Support/APInt.cpp
@@ -31,6 +31,8 @@ using namespace llvm;
 
 #define DEBUG_TYPE "apint"
 
+#define    DebugTyPe     "foo"
+
 /// A utility function for allocating memory, checking for allocation failures,
 /// and ensuring the contents are zeroed.
 inline static uint64_t* getClearedMemory(unsigned numWords) {



More information about the llvm-commits mailing list