Skip to content

Commit 6d10523

Browse files
Upgrade to clang-tidy 15 (#6439)
1 parent 2bbb347 commit 6d10523

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

.clang-tidy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Checks: >
4242
-llvm-twine-local,
4343
misc-*,
4444
-misc-argument-comment,
45+
-misc-const-correctness,
4546
-misc-non-private-member-variables-in-classes,
4647
-misc-unconventional-assign-operator,
4748
-misc-no-recursion,

.github/workflows/osrm-backend.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,14 @@ jobs:
180180
CXXCOMPILER: clang++-6.0
181181
CUCUMBER_TIMEOUT: 60000
182182

183-
- name: clang-11.0-debug-clang-tidy
183+
- name: clang-15.0-debug-clang-tidy
184184
continue-on-error: false
185185
node: 16
186186
runs-on: ubuntu-22.04
187187
BUILD_TOOLS: ON
188188
BUILD_TYPE: Debug
189-
CCOMPILER: clang-14
190-
CXXCOMPILER: clang++-14
189+
CCOMPILER: clang-15
190+
CXXCOMPILER: clang++-15
191191
CUCUMBER_TIMEOUT: 60000
192192
ENABLE_CLANG_TIDY: ON
193193

@@ -488,10 +488,11 @@ jobs:
488488
- name: Install dev dependencies
489489
run: |
490490
python3 -m pip install conan==1.53.0
491+
491492
# workaround for issue that GitHub Actions seems to not adding it to PATH after https://github.com/actions/runner-images/pull/6499
492493
# and that's why CI cannot find conan executable installed above
493494
if [[ "${RUNNER_OS}" == "macOS" ]]; then
494-
echo "/Library/Frameworks/Python.framework/Versions/3.11/bin" >> $GITHUB_PATH
495+
echo "/Library/Frameworks/Python.framework/Versions/Current/bin" >> $GITHUB_PATH
495496
fi
496497
497498
# ccache
@@ -504,6 +505,12 @@ jobs:
504505
# clang
505506
if [[ "${CCOMPILER}" == "clang-6.0" ]]; then
506507
sudo apt-get update -y && sudo apt-get install clang++-6
508+
elif [[ "${CCOMPILER}" == "clang-15" ]]; then
509+
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
510+
sudo apt-get update -y && sudo apt-get install software-properties-common
511+
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main'
512+
sudo apt-get update -y && sudo apt-get install clang++-15 clang-tidy-15
513+
sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-15 100000
507514
fi
508515
509516
# Linux dev packages
@@ -532,7 +539,6 @@ jobs:
532539
tar zxvf onetbb.tgz
533540
sudo cp -a oneapi-tbb-${TBB_VERSION}/lib/. /usr/local/lib/
534541
sudo cp -a oneapi-tbb-${TBB_VERSION}/include/. /usr/local/include/
535-
536542
- name: Prepare build
537543
run: |
538544
mkdir ${OSRM_BUILD_DIR}

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Unreleased
22
- Changes from 5.27.1
33
- Build:
4+
- CHANGED: Upgrade to clang-tidy 15. [#6439](https://github.com/Project-OSRM/osrm-backend/pull/6439)
45
- CHANGED: Update actions/cache to v3. [#6420](https://github.com/Project-OSRM/osrm-backend/pull/6420)
56
- REMOVED: Drop support of Node 12 & 14. [#6431](https://github.com/Project-OSRM/osrm-backend/pull/6431)
67
- Misc:

src/contractor/graph_contractor.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,6 @@ std::vector<bool> contractGraph(ContractorGraph &graph,
645645

646646
const util::XORFastHash<> hash;
647647

648-
unsigned current_level = 0;
649648
std::size_t next_renumbering = number_of_nodes * 0.35;
650649
while (remaining_nodes.size() > number_of_core_nodes)
651650
{
@@ -761,7 +760,6 @@ std::vector<bool> contractGraph(ContractorGraph &graph,
761760
remaining_nodes.resize(begin_independent_nodes_idx);
762761

763762
p.PrintStatus(number_of_contracted_nodes);
764-
++current_level;
765763
}
766764

767765
node_data.Renumber(new_to_old_node_id);

0 commit comments

Comments
 (0)