Skip to content

Silencing clang-tidy warnings #1551

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/exec/any_sender_of.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ namespace exec {
}

__t(const __t& __other)
requires(_Copyable)
requires(_Copyable) : __vtable_(__other.__vtable_)
{
(*__other.__vtable_)(__copy_construct, this, __other);
}
Expand All @@ -460,7 +460,7 @@ namespace exec {
return *this;
}

__t(__t&& __other) noexcept {
__t(__t&& __other) noexcept : __vtable_(__other.__vtable_) {
(*__other.__vtable_)(__move_construct, this, static_cast<__t&&>(__other));
}

Expand Down
8 changes: 5 additions & 3 deletions include/exec/task.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,16 +320,16 @@ namespace exec {

private:
struct __final_awaitable {
static constexpr auto await_ready() noexcept -> bool {
constexpr auto await_ready() noexcept -> bool {
return false;
}

static auto await_suspend(__coro::coroutine_handle<__promise> __h) noexcept
auto await_suspend(__coro::coroutine_handle<__promise> __h) noexcept
-> __coro::coroutine_handle<> {
return __h.promise().continuation().handle();
}

static void await_resume() noexcept {
void await_resume() noexcept {
}
Comment on lines -323 to 333
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the code is correct. these functions do not need to be passed a this pointer, hence the static. is there a way to suppress this warning locally?

};

Expand Down Expand Up @@ -369,6 +369,7 @@ namespace exec {
this->__data_.template emplace<1>(std::current_exception());
}

#ifndef __clang_analyzer__
template <sender _Awaitable>
requires __scheduler_provider<_Context>
auto await_transform(_Awaitable&& __awaitable) noexcept -> decltype(auto) {
Expand Down Expand Up @@ -396,6 +397,7 @@ namespace exec {
__context_->set_scheduler(__box.__sched_);
return as_awaitable(schedule(__box.__sched_), *this);
}
#endif

template <class _Awaitable>
auto await_transform(_Awaitable&& __awaitable) noexcept -> decltype(auto) {
Expand Down