build: update clang v21, fix warnings

- `src/nvim/ex_cmds_defs.h`: use "U" instead of "u" per
  `readability-uppercase-literal-suffix`
This commit is contained in:
dundargoc
2025-11-09 21:22:54 +01:00
committed by Justin M. Keyes
parent e243bed18f
commit 8a4bee3ed0
55 changed files with 122 additions and 116 deletions

View File

@@ -1,4 +1,5 @@
#!/bin/bash
set -e
while (($# > 0)); do
case $1 in
@@ -17,7 +18,7 @@ if [[ $OS == Linux ]]; then
if [[ $CC == clang ]]; then
DEFAULT_CLANG_VERSION=$(echo | clang -dM -E - | grep __clang_major | awk '{print $3}')
CLANG_VERSION=19
CLANG_VERSION=21
if ((DEFAULT_CLANG_VERSION >= CLANG_VERSION)); then
echo "Default clang version is $DEFAULT_CLANG_VERSION, which is equal or larger than wanted version $CLANG_VERSION. Aborting!"
exit 1
@@ -26,6 +27,8 @@ if [[ $OS == Linux ]]; then
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh $CLANG_VERSION
# Alternatively could use `./llvm.sh … all` above, but that is heavy/slow.
sudo apt-get install -y clang-tidy-$CLANG_VERSION
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-$CLANG_VERSION 100
sudo update-alternatives --set clang /usr/bin/clang-$CLANG_VERSION
sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-$CLANG_VERSION 100