Skip to content

Commit

Permalink
Bump clang-tidy version to 19
Browse files Browse the repository at this point in the history
  • Loading branch information
alexreinking committed Dec 16, 2024
1 parent 49a2d58 commit 7b98d62
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Install clang-tidy
run: brew install llvm@17 ninja
run: brew install llvm@19 ninja
- name: Run clang-tidy
run: ./run-clang-tidy.sh
env:
CLANG_TIDY_LLVM_INSTALL_DIR: /opt/homebrew/opt/llvm@17
CLANG_TIDY_LLVM_INSTALL_DIR: /opt/homebrew/opt/llvm@19
check_cmake_file_lists:
name: Check CMake file lists
runs-on: ubuntu-20.04
Expand Down
20 changes: 10 additions & 10 deletions run-clang-tidy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,18 @@ if [ -n "${FIX}" ]; then
echo "Operating in -fix mode!"
fi

# We are currently standardized on using LLVM/Clang 17 for this script.
# We are currently standardized on using LLVM/Clang 19 for this script.
# Note that this is totally independent of the version of LLVM that you
# are using to build Halide itself. If you don't have LLVM17 installed,
# are using to build Halide itself. If you don't have LLVM19 installed,
# you can usually install what you need easily via:
#
# sudo apt-get install llvm-17 clang-17 libclang-17-dev clang-tidy-17
# export CLANG_TIDY_LLVM_INSTALL_DIR=/usr/lib/llvm-17
# sudo apt-get install llvm-19 clang-19 libclang-19-dev clang-tidy-19
# export CLANG_TIDY_LLVM_INSTALL_DIR=/usr/lib/llvm-19
#
# On macOS:
#
# brew install llvm@17
# export CLANG_TIDY_LLVM_INSTALL_DIR=/opt/homebrew/opt/llvm@17
# brew install llvm@19
# export CLANG_TIDY_LLVM_INSTALL_DIR=/opt/homebrew/opt/llvm@19

if [ -z "$CLANG_TIDY_LLVM_INSTALL_DIR" ]; then
echo "CLANG_TIDY_LLVM_INSTALL_DIR must point to an LLVM installation dir for this script."
Expand All @@ -62,11 +62,11 @@ fi
echo "CLANG_TIDY_LLVM_INSTALL_DIR = ${CLANG_TIDY_LLVM_INSTALL_DIR}"

VERSION=$("${CLANG_TIDY_LLVM_INSTALL_DIR}/bin/clang-tidy" --version)
if [[ ${VERSION} =~ .*version\ 17.* ]]
if [[ ${VERSION} =~ .*version\ 19.* ]]
then
echo "clang-tidy version 17 found."
echo "clang-tidy version 19 found."
else
echo "CLANG_TIDY_LLVM_INSTALL_DIR must point to an LLVM 17 install!"
echo "CLANG_TIDY_LLVM_INSTALL_DIR must point to an LLVM 19 install!"
exit 1
fi

Expand Down Expand Up @@ -140,4 +140,4 @@ echo "run-clang-tidy finished with status ${RESULT}"

rm -rf "${CLANG_TIDY_BUILD_DIR}"

exit "${RESULT}"
exit "${RESULT}"

0 comments on commit 7b98d62

Please sign in to comment.