Skip to content

Commit 41f673e

Browse files
authored
Silencing clang-tidy warnings (#1551)
- Silencing "Assigned value is garbage or undefined": - Properly initialize vtable - Disabling some code when run under clang-tidy
1 parent 6c1f415 commit 41f673e

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

include/exec/any_sender_of.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ namespace exec {
446446
}
447447

448448
__t(const __t& __other)
449-
requires(_Copyable)
449+
requires(_Copyable) : __vtable_(__other.__vtable_)
450450
{
451451
(*__other.__vtable_)(__copy_construct, this, __other);
452452
}
@@ -461,7 +461,7 @@ namespace exec {
461461
return *this;
462462
}
463463

464-
__t(__t&& __other) noexcept {
464+
__t(__t&& __other) noexcept : __vtable_(__other.__vtable_) {
465465
(*__other.__vtable_)(__move_construct, this, static_cast<__t&&>(__other));
466466
}
467467

include/exec/task.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ namespace exec {
369369
this->__data_.template emplace<1>(std::current_exception());
370370
}
371371

372+
#ifndef __clang_analyzer__
372373
template <sender _Awaitable>
373374
requires __scheduler_provider<_Context>
374375
auto await_transform(_Awaitable&& __awaitable) noexcept -> decltype(auto) {
@@ -396,6 +397,7 @@ namespace exec {
396397
__context_->set_scheduler(__box.__sched_);
397398
return as_awaitable(schedule(__box.__sched_), *this);
398399
}
400+
#endif
399401

400402
template <class _Awaitable>
401403
auto await_transform(_Awaitable&& __awaitable) noexcept -> decltype(auto) {

0 commit comments

Comments
 (0)