diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f4a6623..bcd970c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -120,10 +120,11 @@ jobs: env: HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 run: | - brew install --quiet ninja capnp + brew install --quiet ninja capnp llvm - name: Run CI script run: | + export PATH="$(brew --prefix llvm)/bin:$PATH" CI_CONFIG="ci/configs/macos.bash" bash ci/scripts/ci.sh build: diff --git a/ci/configs/macos.bash b/ci/configs/macos.bash index a444bac..895d795 100644 --- a/ci/configs/macos.bash +++ b/ci/configs/macos.bash @@ -1,5 +1,5 @@ CI_DESC="CI config for macOS" CI_DIR=build-macos export CXXFLAGS="-Werror -Wall -Wextra -Wpedantic -Wno-unused-parameter" -CMAKE_ARGS=(-G Ninja) +CMAKE_ARGS=(-G Ninja -DMP_ENABLE_CLANG_TIDY=ON) BUILD_ARGS=(-k 0) diff --git a/cmake/pthread_checks.cmake b/cmake/pthread_checks.cmake index 241978d..8771141 100644 --- a/cmake/pthread_checks.cmake +++ b/cmake/pthread_checks.cmake @@ -25,7 +25,7 @@ check_cxx_source_compiles(" int main(int argc, char** argv) { uint64_t tid; - pthread_threadid_np(NULL, &tid); + pthread_threadid_np(nullptr, &tid); return 0; }" HAVE_PTHREAD_THREADID_NP) diff --git a/src/mp/util.cpp b/src/mp/util.cpp index 7b48608..ad4a7f6 100644 --- a/src/mp/util.cpp +++ b/src/mp/util.cpp @@ -81,7 +81,7 @@ std::string ThreadName(const char* exe_name) buffer << syscall(SYS_gettid); #elif defined(HAVE_PTHREAD_THREADID_NP) uint64_t tid = 0; - pthread_threadid_np(NULL, &tid); + pthread_threadid_np(nullptr, &tid); buffer << tid; #elif defined(HAVE_PTHREAD_GETTHREADID_NP) buffer << pthread_getthreadid_np();