aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include/experimental
diff options
context:
space:
mode:
authorNikolas Klauser <nikolasklauser@berlin.de>2022-08-13 22:33:12 +0200
committerNikolas Klauser <nikolasklauser@berlin.de>2022-12-23 15:42:13 +0100
commit841399a2188aaf244e83e3df7be66885ec905ede (patch)
tree0584ba9836530c245c45cf8537d4b26a1cdcffd4 /libcxx/include/experimental
parent0026874c8bd0616b520779b9fcfdb05e53ea4dca (diff)
downloadllvm-841399a2188aaf244e83e3df7be66885ec905ede.zip
llvm-841399a2188aaf244e83e3df7be66885ec905ede.tar.gz
llvm-841399a2188aaf244e83e3df7be66885ec905ede.tar.bz2
[libc++] Add custom clang-tidy checks
Reviewed By: #libc, ldionne Spies: jwakely, beanz, smeenai, cfe-commits, tschuett, avogelsgesang, Mordante, sstefan1, libcxx-commits, ldionne, mgorny, arichardson, miyuki Differential Revision: https://reviews.llvm.org/D131963
Diffstat (limited to 'libcxx/include/experimental')
-rw-r--r--libcxx/include/experimental/functional24
-rw-r--r--libcxx/include/experimental/simd10
2 files changed, 17 insertions, 17 deletions
diff --git a/libcxx/include/experimental/functional b/libcxx/include/experimental/functional
index 39281bd..cb9a5ef 100644
--- a/libcxx/include/experimental/functional
+++ b/libcxx/include/experimental/functional
@@ -205,8 +205,8 @@ public:
_Hash __hf = _Hash(), _BinaryPredicate __pred = _BinaryPredicate())
: __first_(__f), __last_(__l), __pred_(__pred),
__pattern_length_(_VSTD::distance(__first_, __last_)),
- __skip_{make_shared<skip_table_type>(__pattern_length_, -1, __hf, __pred_)},
- __suffix_{make_shared<vector<difference_type>>(__pattern_length_ + 1)}
+ __skip_{std::make_shared<skip_table_type>(__pattern_length_, -1, __hf, __pred_)},
+ __suffix_{std::make_shared<vector<difference_type>>(__pattern_length_ + 1)}
{
// build the skip table
for ( difference_type __i = 0; __f != __l; ++__f, (void) ++__i )
@@ -223,12 +223,12 @@ public:
typename iterator_traits<_RandomAccessIterator2>::value_type>::value,
"Corpus and Pattern iterators must point to the same type");
- if (__f == __l ) return make_pair(__l, __l); // empty corpus
- if (__first_ == __last_) return make_pair(__f, __f); // empty pattern
+ if (__f == __l ) return std::make_pair(__l, __l); // empty corpus
+ if (__first_ == __last_) return std::make_pair(__f, __f); // empty pattern
// If the pattern is larger than the corpus, we can't find it!
if ( __pattern_length_ > _VSTD::distance(__f, __l))
- return make_pair(__l, __l);
+ return std::make_pair(__l, __l);
// Do the search
return this->__search(__f, __l);
@@ -260,7 +260,7 @@ private:
__j--;
// We matched - we're done!
if ( __j == 0 )
- return make_pair(__cur, __cur + __pattern_length_);
+ return std::make_pair(__cur, __cur + __pattern_length_);
}
// Since we didn't match, figure out how far to skip forward
@@ -272,7 +272,7 @@ private:
__cur += __suffix[ __j ];
}
- return make_pair(__l, __l); // We didn't find anything
+ return std::make_pair(__l, __l); // We didn't find anything
}
@@ -373,12 +373,12 @@ public:
typename std::iterator_traits<_RandomAccessIterator2>::value_type>::value,
"Corpus and Pattern iterators must point to the same type");
- if (__f == __l ) return make_pair(__l, __l); // empty corpus
- if (__first_ == __last_) return make_pair(__f, __f); // empty pattern
+ if (__f == __l ) return std::make_pair(__l, __l); // empty corpus
+ if (__first_ == __last_) return std::make_pair(__f, __f); // empty pattern
// If the pattern is larger than the corpus, we can't find it!
if ( __pattern_length_ > _VSTD::distance(__f, __l))
- return make_pair(__l, __l);
+ return std::make_pair(__l, __l);
// Do the search
return this->__search(__f, __l);
@@ -407,12 +407,12 @@ private:
__j--;
// We matched - we're done!
if ( __j == 0 )
- return make_pair(__cur, __cur + __pattern_length_);
+ return std::make_pair(__cur, __cur + __pattern_length_);
}
__cur += __skip[__cur[__pattern_length_-1]];
}
- return make_pair(__l, __l);
+ return std::make_pair(__l, __l);
}
};
diff --git a/libcxx/include/experimental/simd b/libcxx/include/experimental/simd
index 34afb5f..4ca67d2 100644
--- a/libcxx/include/experimental/simd
+++ b/libcxx/include/experimental/simd
@@ -925,7 +925,7 @@ constexpr typename std::enable_if<std::is_arithmetic<_To>::value &&
std::is_arithmetic<_From>::value,
bool>::type
__is_non_narrowing_arithmetic_convertible() {
- return __is_non_narrowing_convertible_impl<_To>(_From{});
+ return experimental::__is_non_narrowing_convertible_impl<_To>(_From{});
}
template <class _From, class _To>
@@ -944,7 +944,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr _Tp __variadic_sum() {
template <class _Tp, class _Up, class... _Args>
_LIBCPP_HIDE_FROM_ABI constexpr _Tp __variadic_sum(_Up __first, _Args... __rest) {
- return static_cast<_Tp>(__first) + __variadic_sum<_Tp>(__rest...);
+ return static_cast<_Tp>(__first) + experimental::__variadic_sum<_Tp>(__rest...);
}
template <class _Tp>
@@ -1170,12 +1170,12 @@ array<_SimdType, simd_size<typename _SimdType::value_type, _Abi>::value /
split(const simd_mask<typename _SimdType::value_type, _Abi>&);
template <class _Tp, class... _Abis>
-simd<_Tp, abi_for_size_t<_Tp, __variadic_sum(simd_size<_Tp, _Abis>::value...)>>
+simd<_Tp, abi_for_size_t<_Tp, experimental::__variadic_sum(simd_size<_Tp, _Abis>::value...)>>
concat(const simd<_Tp, _Abis>&...);
template <class _Tp, class... _Abis>
simd_mask<_Tp,
- abi_for_size_t<_Tp, __variadic_sum(simd_size<_Tp, _Abis>::value...)>>
+ abi_for_size_t<_Tp, experimental::__variadic_sum(simd_size<_Tp, _Abis>::value...)>>
concat(const simd_mask<_Tp, _Abis>&...);
// reductions [simd.mask.reductions]
@@ -1379,7 +1379,7 @@ private:
std::integral_constant<size_t, __indicies>())...),
bool())
__can_generate(std::index_sequence<__indicies...>) {
- return !__variadic_sum<bool>(
+ return !experimental::__variadic_sum<bool>(
!__can_broadcast<decltype(std::declval<_Generator>()(
std::integral_constant<size_t, __indicies>()))>()...);
}