Update clang-tidy. (#10730)

- Install cmake using pip.
- Fix compile command generation.
- Clean up the tidy script and remove the need to load the yaml file.
- Fix modernized type traits.
- Fix span class. Polymorphism support is dropped
This commit is contained in:
Jiaming Yuan
2024-08-22 04:12:18 +08:00
committed by GitHub
parent 03bd1183bc
commit cb54374550
34 changed files with 361 additions and 387 deletions

View File

@@ -82,7 +82,7 @@ class AllreduceFunctor {
}
private:
template <class T, std::enable_if_t<std::is_integral<T>::value>* = nullptr>
template <class T, std::enable_if_t<std::is_integral_v<T>>* = nullptr>
void AccumulateBitwise(T* buffer, T const* input, std::size_t size, Op reduce_operation) const {
switch (reduce_operation) {
case Op::kBitwiseAND:
@@ -99,7 +99,7 @@ class AllreduceFunctor {
}
}
template <class T, std::enable_if_t<std::is_floating_point<T>::value>* = nullptr>
template <class T, std::enable_if_t<std::is_floating_point_v<T>>* = nullptr>
void AccumulateBitwise(T*, T const*, std::size_t, Op) const {
LOG(FATAL) << "Floating point types do not support bitwise operations.";
}