Skip to content

Commit 7b3494d

Browse files
committed
Delegate clang-tidy -Werror enforcement to CMake instead of .clang-tidy
1 parent 06458f6 commit 7b3494d

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

.clang-tidy

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ Checks: >
4141
-portability-template-virtual-member-function,
4242
-readability-magic-numbers
4343
44-
WarningsAsErrors: "*"
4544
HeaderFilterRegex: '.*/(modules|tasks)/.*'
4645

4746
CheckOptions:

.github/workflows/static-analysis-pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- name: CMake configure
4848
run: >
4949
cmake -S . -B build -G Ninja
50-
-D CMAKE_BUILD_TYPE=RELEASE -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
50+
-D CMAKE_BUILD_TYPE=RELEASE -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON
5151
env:
5252
CC: clang-21
5353
CXX: clang++-21
@@ -96,7 +96,7 @@ jobs:
9696
- name: CMake configure
9797
run: >
9898
cmake -S . -B build -G Ninja
99-
-D CMAKE_BUILD_TYPE=RELEASE -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
99+
-D CMAKE_BUILD_TYPE=RELEASE -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON
100100
env:
101101
CC: gcc-14
102102
CXX: g++-14

tasks/example_threads/tbb/src/ops_tbb.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ bool NesterovATestTaskTBB::RunImpl() {
4242
GetOutput() *= num_threads;
4343

4444
std::atomic<int> counter(0);
45-
tbb::parallel_for(0, ppc::util::GetNumThreads(), [&](int /*i*/) { counter++; });
45+
tbb::parallel_for(0, ppc::util::GetNumThreads(), [&](int i) { counter++; });
4646

4747
GetOutput() /= counter;
4848
return GetOutput() > 0;

0 commit comments

Comments
 (0)