Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang-tidy.yml: updated to Clang 18 #307

Merged
merged 6 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,19 @@ Checks: >
-modernize-use-override,
-modernize-use-trailing-return-type,
-modernize-use-using,
-readability-avoid-nested-conditional-operator,
-readability-braces-around-statements,
-readability-function-cognitive-complexity,
-readability-function-size,
-readability-implicit-bool-conversion,
-readability-identifier-length,
-readability-isolate-declaration,
-readability-magic-numbers,
-readability-redundant-inline-specifier,
-readability-simplify-boolean-expr,
-readability-uppercase-literal-suffix,
-performance-avoid-endl,
-performance-enum-size,
-performance-inefficient-string-concatenation,
-performance-no-automatic-move,
-performance-noexcept-move-constructor
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/CI-unixish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
make clean
make -j$(nproc) test selfcheck CXXFLAGS="-g3 -D_GLIBCXX_DEBUG"

# TODO: change it to -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG when the compiler is at least Clang 18
- name: Run with libc++ debug mode
if: matrix.os == 'ubuntu-22.04' && matrix.compiler == 'clang++'
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ jobs:
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 17
sudo apt-get install clang-tidy-17
sudo ./llvm.sh 18
sudo apt-get install clang-tidy-18

- name: Verify clang-tidy configuration
run: |
clang-tidy-17 --verify-config
clang-tidy-18 --verify-config

- name: Prepare CMake
run: |
cmake -S . -B cmake.output -G "Unix Makefiles" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DDISABLE_CPP03_SYNTAX_CHECK=ON
env:
CXX: clang-17
CXX: clang-18

- name: Clang-Tidy
run: |
run-clang-tidy-17 -q -j $(nproc) -p=cmake.output
run-clang-tidy-18 -q -j $(nproc) -p=cmake.output
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wno-multichar -Wno-four-char-constants)
# ignore C++11-specific warning
add_compile_options(-Wno-suggest-override -Wno-suggest-destructor-override)
# contradicts -Wcovered-switch-default
add_compile_options(-Wno-switch-default)
# TODO: fix these?
add_compile_options(-Wno-padded -Wno-sign-conversion -Wno-implicit-int-conversion -Wno-shorten-64-to-32 -Wno-shadow-field-in-constructor)

Expand Down
Loading