Skip to content

Commit c9fb7b3

Browse files
authored
Merge pull request #72 from beman-project/address-clang-tidy-reports
Address clang tidy reports
2 parents a760a29 + 194a500 commit c9fb7b3

File tree

71 files changed

+412
-152
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+412
-152
lines changed

.nojekyll

Whitespace-only changes.

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,12 @@ clang-tidy: build/$(SANITIZER)/compile_commands.json
8989
codespell:
9090
codespell -L statics,snd,copyable,cancelled
9191

92-
format:
92+
format: cmake-format clang-format
93+
94+
cmake-format:
9395
cmake-format -i `git diff --name-only main | egrep '(CMakeLists.txt|\.cmake)'`
96+
97+
clang-format:
9498
git clang-format main
9599

96100
todo:

include/beman/execution26/detail/allocator_aware_move.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ template <typename T, typename Context>
1919
* \headerfile beman/execution26/execution.hpp <beman/execution26/execution.hpp>
2020
* \internal
2121
*/
22-
auto allocator_aware_move(T&& obj, Context&& context) -> decltype(auto) {
22+
auto allocator_aware_move(T&& obj, Context&& context) noexcept -> decltype(auto) {
2323
if constexpr (requires { ::beman::execution26::get_allocator(::beman::execution26::get_env(context)); }) {
2424
if constexpr (decltype(::beman::execution26::detail::is_product_type(obj))()) {
2525
return obj.make_from(::beman::execution26::get_allocator(::beman::execution26::get_env(context)),

include/beman/execution26/detail/basic_operation.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,11 @@ template <typename Sender, typename Receiver>
3838
basic_operation(Sender&& sender, Receiver&& receiver) noexcept(true /*-dk:TODO*/)
3939
: ::beman::execution26::detail::basic_state<Sender, Receiver>(::std::forward<Sender>(sender),
4040
::std::move(receiver)),
41+
// NOLINTBEGIN(bugprone-use-after-move,hicpp-invalid-access-moved)
42+
//-dk:TODO deal with moving the sender twice
4143
inner_ops(::beman::execution26::detail::connect_all(
4244
this, ::std::forward<Sender>(sender), ::beman::execution26::detail::indices_for<Sender>())) {}
45+
// NOLINTEND(bugprone-use-after-move,hicpp-invalid-access-moved)
4346

4447
private:
4548
auto start() & noexcept -> void {

include/beman/execution26/detail/basic_sender.hpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
#include <beman/execution26/detail/get_completion_signatures.hpp>
1616
#include <utility>
1717

18+
#include <beman/execution26/detail/suppress_push.hpp>
19+
1820
// ----------------------------------------------------------------------------
1921

2022
namespace beman::execution26::detail {
@@ -37,10 +39,11 @@ struct basic_sender : ::beman::execution26::detail::product_type<Tag, Data, Chil
3739
data.children);
3840
}
3941

40-
private:
4142
template <typename Receiver>
4243
requires(not::beman::execution26::receiver<Receiver>)
4344
auto connect(Receiver receiver) = BEMAN_EXECUTION26_DELETE("the passed receiver doesn't model receiver");
45+
46+
private:
4447
#if __cpp_explicit_this_parameter < 202110L
4548
template <::beman::execution26::receiver Receiver>
4649
auto connect(Receiver receiver) & noexcept(true /*-dk:TODO*/)
@@ -97,4 +100,6 @@ struct basic_sender : ::beman::execution26::detail::product_type<Tag, Data, Chil
97100

98101
// ----------------------------------------------------------------------------
99102

103+
#include <beman/execution26/detail/suppress_pop.hpp>
104+
100105
#endif

include/beman/execution26/detail/emplace_from.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ struct emplace_from {
1717
using type = ::beman::execution26::detail::call_result_t<Fun>;
1818
Fun fun;
1919

20-
constexpr operator type() && noexcept(::beman::execution26::detail::nothrow_callable<Fun>) {
20+
explicit constexpr operator type() && noexcept(::beman::execution26::detail::nothrow_callable<Fun>) {
2121
return ::std::move(fun)();
2222
}
2323
};

include/beman/execution26/detail/forward_like.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ template <typename T>
1919
struct forward_like_helper {
2020
template <typename U>
2121
static auto forward(U&& u) -> ::std::remove_reference_t<U>&& {
22-
return ::std::move(u);
22+
return ::std::move(u); // NOLINT(bugprone-move-forwarding-reference)
2323
}
2424
};
2525
template <typename T>
2626
struct forward_like_helper<T&&> {
2727
template <typename U>
2828
static auto forward(U&& u) -> ::std::remove_cvref_t<U>&& {
29-
return ::std::move(u);
29+
return ::std::move(u); // NOLINT(bugprone-move-forwarding-reference)
3030
}
3131
};
3232
template <typename T>
@@ -40,7 +40,7 @@ template <typename T>
4040
struct forward_like_helper<const T&&> {
4141
template <typename U>
4242
static auto forward(U&& u) -> const ::std::remove_cvref_t<U>&& {
43-
return ::std::move(u);
43+
return ::std::move(u); // NOLINT(bugprone-move-forwarding-reference)
4444
}
4545
};
4646
template <typename T>

include/beman/execution26/detail/fwd_env.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#include <type_traits>
1010
#include <utility>
1111

12+
#include <beman/execution26/detail/suppress_push.hpp>
13+
1214
// ----------------------------------------------------------------------------
1315

1416
namespace beman::execution26::detail {
@@ -18,7 +20,7 @@ class fwd_env {
1820
Env env;
1921

2022
public:
21-
fwd_env(Env&& env) : env(::std::forward<Env>(env)) {}
23+
explicit fwd_env(Env&& env) : env(::std::forward<Env>(env)) {}
2224

2325
template <typename Query, typename... Args>
2426
requires(not::beman::execution26::forwarding_query(::std::remove_cvref_t<Query>()))
@@ -39,4 +41,6 @@ fwd_env(Env&&) -> fwd_env<Env>;
3941

4042
// ----------------------------------------------------------------------------
4143

44+
#include <beman/execution26/detail/suppress_pop.hpp>
45+
4246
#endif

include/beman/execution26/detail/get_allocator.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#include <concepts>
1111
#include <utility>
1212

13+
#include <beman/execution26/detail/suppress_push.hpp>
14+
1315
// ----------------------------------------------------------------------------
1416

1517
namespace beman::execution26 {
@@ -54,4 +56,6 @@ inline constexpr get_allocator_t get_allocator{};
5456

5557
// ----------------------------------------------------------------------------
5658

59+
#include <beman/execution26/detail/suppress_pop.hpp>
60+
5761
#endif

include/beman/execution26/detail/get_completion_scheduler.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
#include <type_traits>
1919
#include <utility>
2020

21+
#include <beman/execution26/detail/suppress_push.hpp>
22+
2123
// ----------------------------------------------------------------------------
2224

2325
namespace beman::execution26 {
@@ -82,4 +84,6 @@ inline constexpr get_completion_scheduler_t<Tag> get_completion_scheduler{};
8284

8385
// ----------------------------------------------------------------------------
8486

87+
#include <beman/execution26/detail/suppress_pop.hpp>
88+
8589
#endif

0 commit comments

Comments
 (0)