Skip to content

Commit 96e60e7

Browse files
committed
try to clean up some clangd errors
1 parent cc66ad2 commit 96e60e7

File tree

90 files changed

+185
-219
lines changed

Some content is hidden

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

90 files changed

+185
-219
lines changed

.clang-tidy

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ ImplementationFileExtensions:
1313
- cpp
1414
- cxx
1515
HeaderFilterRegex: ''
16-
AnalyzeTemporaryDtors: false
1716
FormatStyle: none
1817
User: eniebler
1918
CheckOptions:

.clangd

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,33 @@ If:
66

77
---
88

9-
# Apply a config conditionally to all C++ files
9+
# Apply a config conditionally to all C++ files except those in the
10+
# include/execpools directory which need platform-dependent headers
1011
If:
11-
PathMatch: .*\.(c|h)pp
12+
PathMatch: .*\.(c|h)pp$
13+
PathExclude: .*/execpools/.*
1214

1315
---
1416

1517
# Apply a config conditionally to all CUDA files
1618
If:
17-
PathMatch: .*\.cuh?
19+
PathMatch: .*\.cuh?$
1820
CompileFlags:
1921
Add:
2022
# Allow variadic CUDA functions
2123
- "-Xclang=-fcuda-allow-variadic-functions"
2224

2325
---
2426

27+
# The following file assumes a define.
28+
If:
29+
PathMatch: .*/__system_context_default_impl_entry\.hpp
30+
CompileFlags:
31+
Add:
32+
- "-DSTDEXEC_SYSTEM_CONTEXT_INLINE=inline"
33+
34+
---
35+
2536
# Use clang++ in CUDA mode to provide intellisense for files with `nvexec` in their path
2637
If:
2738
PathMatch: (include|examples|test)/nvexec.*
@@ -70,3 +81,5 @@ Diagnostics:
7081
# The NVHPC version of _NVCXX_EXPAND_PACK macro triggers this clang error.
7182
# Temporarily suppressing it, but should probably fix
7283
- "template_param_shadow"
84+
- "pp_expr_bad_token_binop" # erroneous error from STDEXEC_ENABLE_EXTRA_TYPE_CHECKING()
85+
- "#warnings"

include/exec/__detail/__bit_cast.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#endif
2727

2828
#include <cstring>
29-
#include <type_traits>
3029

3130
namespace exec {
3231

include/exec/__detail/__bwos_lifo_queue.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include <cstddef>
2525
#include <cstdint>
2626
#include <memory>
27-
#include <new>
2827
#include <utility>
2928
#include <vector>
3029

include/exec/__detail/__numa.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@
1717
#pragma once
1818

1919
#include "../../stdexec/__detail/__config.hpp"
20-
#include "../scope.hpp"
20+
#include "../../stdexec/__detail/__meta.hpp"
21+
#include "../scope.hpp" // IWYU pragma: keep
2122

22-
#include <algorithm>
23+
#include <algorithm> // IWYU pragma: keep
2324
#include <cstddef>
2425
#include <memory>
25-
#include <new>
26+
#include <new> // IWYU pragma: keep
2627
#include <thread>
28+
#include <utility>
2729

2830
// Work around a bug in the NVHPC compilers prior to version 24.03
2931
#if STDEXEC_NVHPC()

include/exec/__detail/__system_context_default_impl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ namespace exec::__system_context_default_impl {
233233
}
234234
};
235235

236-
void* __default_query_system_context_interface(const __uuid& __id) noexcept {
236+
inline void* __default_query_system_context_interface(const __uuid& __id) noexcept {
237237
if (__id == system_scheduler::__interface_identifier) {
238238
return __instance_holder::__singleton().__get_current_instance();
239239
} else if (__id == __system_context_replaceability::__interface_identifier) {

include/exec/__detail/__system_context_default_impl_entry.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# error "STDEXEC_SYSTEM_CONTEXT_INLINE must be defined before including this header"
2222
#endif
2323

24-
#include "__system_context_default_impl.hpp"
24+
#include "__system_context_default_impl.hpp" // IWYU pragma: keep
2525

2626
STDEXEC_PRAGMA_PUSH()
2727
STDEXEC_PRAGMA_IGNORE_GNU("-Wattributes") // warning: inline function '[...]' declared weak

include/exec/__detail/__system_context_replaceability_api.hpp

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,12 @@
1717
#ifndef STDEXEC_SYSTEM_CONTEXT_REPLACEABILITY_API_H
1818
#define STDEXEC_SYSTEM_CONTEXT_REPLACEABILITY_API_H
1919

20-
#include "stdexec/__detail/__execution_fwd.hpp"
21-
22-
#include <typeindex>
20+
#include <cstdint>
21+
#include <exception>
2322

2423
struct __uuid {
25-
uint64_t __parts1;
26-
uint64_t __parts2;
24+
std::uint64_t __parts1;
25+
std::uint64_t __parts2;
2726

2827
friend bool operator==(__uuid, __uuid) noexcept = default;
2928
};
@@ -37,7 +36,8 @@ namespace exec::system_context_replaceability {
3736
template <__uuid X>
3837
using __check_constexpr_uuid = void;
3938

40-
//! Concept for a queryable interface. Ensures that the interface has a `__interface_identifier` member.
39+
//! Concept for a queryable interface. Ensures that the interface has a `__interface_identifier`
40+
//! member.
4141
template <typename _T>
4242
concept __queryable_interface =
4343
requires() { typename __check_constexpr_uuid<_T::__interface_identifier>; };
@@ -49,8 +49,8 @@ namespace exec::system_context_replaceability {
4949
__query_system_context_interface(_Interface::__interface_identifier));
5050
}
5151

52-
/// Interface for completing a sender operation.
53-
/// Backend will call frontend though this interface for completing the `schedule` and `schedule_bulk` operations.
52+
/// Interface for completing a sender operation. Backend will call frontend though this interface
53+
/// for completing the `schedule` and `schedule_bulk` operations.
5454
struct receiver {
5555
virtual ~receiver() = default;
5656

@@ -65,14 +65,14 @@ namespace exec::system_context_replaceability {
6565
/// Receiver for bulk sheduling operations.
6666
struct bulk_item_receiver : receiver {
6767
/// Called for each item of a bulk operation, possible on different threads.
68-
virtual void start(uint32_t) noexcept = 0;
68+
virtual void start(std::uint32_t) noexcept = 0;
6969
};
7070

7171
/// Describes a storage space.
7272
/// Used to pass preallocated storage from the frontend to the backend.
7373
struct storage {
7474
void* __data;
75-
uint32_t __size;
75+
std::uint32_t __size;
7676
};
7777

7878
/// Interface for the system scheduler
@@ -81,10 +81,13 @@ namespace exec::system_context_replaceability {
8181

8282
virtual ~system_scheduler() = default;
8383

84-
/// Schedule work on system scheduler, calling `__r` when done and using `__s` for preallocated memory.
84+
/// Schedule work on system scheduler, calling `__r` when done and using `__s` for preallocated
85+
/// memory.
8586
virtual void schedule(storage __s, receiver* __r) noexcept = 0;
86-
/// Schedule bulk work of size `__n` on system scheduler, calling `__r` for each item and then when done, and using `__s` for preallocated memory.
87-
virtual void bulk_schedule(uint32_t __n, storage __s, bulk_item_receiver* __r) noexcept = 0;
87+
/// Schedule bulk work of size `__n` on system scheduler, calling `__r` for each item and then
88+
/// when done, and using `__s` for preallocated memory.
89+
virtual void
90+
bulk_schedule(std::uint32_t __n, storage __s, bulk_item_receiver* __r) noexcept = 0;
8891
};
8992

9093
/// Implementation-defined mechanism for replacing the system scheduler backend at run-time.
@@ -98,4 +101,4 @@ namespace exec::system_context_replaceability {
98101

99102
} // namespace exec::system_context_replaceability
100103

101-
#endif
104+
#endif

include/exec/__detail/intrusive_heap.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
#include <cstddef>
2222
#include <bit>
23+
#include <utility>
2324

2425
STDEXEC_PRAGMA_PUSH()
2526
STDEXEC_PRAGMA_IGNORE_EDG(not_used_in_partial_spec_arg_list)

include/exec/any_sender_of.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@
1515
*/
1616
#pragma once
1717

18-
#include "../stdexec/concepts.hpp"
1918
#include "../stdexec/execution.hpp"
20-
#include "../stdexec/functional.hpp"
2119

22-
#include "./sequence_senders.hpp"
20+
#include "sequence_senders.hpp"
2321

2422
#include <cstddef>
2523
#include <utility>

0 commit comments

Comments
 (0)