Skip to content
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
3 changes: 2 additions & 1 deletion docs/dev/clang-tidy-fixes-2026-04.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@
- [ ] [readability-redundant-access-specifiers](https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-access-specifiers.html) (3)
- [x] [readability-redundant-control-flow](https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-control-flow.html) (19)
- [PR #743](https://github.com/Framework-R-D/phlex/pull/743)
- [ ] [readability-redundant-member-init](https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html) (24)
- [x] [readability-redundant-member-init](https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html) (24)
- [PR #763](https://github.com/Framework-R-D/phlex/pull/763)
- [ ] [readability-redundant-string-cstr](https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-string-cstr.html) (1)
- [x] [readability-redundant-string-init](https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-string-init.html) (1)
- [PR #716](https://github.com/Framework-R-D/phlex/pull/716)
Expand Down
2 changes: 1 addition & 1 deletion form/form/form_source_type_registry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace form::experimental {
struct form_source_type_entry {
phlex::detail::type_id type_id;
std::type_info const* cpp_type{nullptr};
form_source_product_from_data_fn product_from_data_fn{};
form_source_product_from_data_fn product_from_data_fn;
};

void register_form_product_type(std::string product_type,
Expand Down
2 changes: 1 addition & 1 deletion form/storage/storage_associative_write_container.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using namespace form::detail::experimental;

Storage_Associative_Write_Container::Storage_Associative_Write_Container(std::string const& name) :
Storage_Write_Container::Storage_Write_Container(name), m_tName(), m_cName(), m_parent(nullptr)
Storage_Write_Container::Storage_Write_Container(name), m_parent(nullptr)
{
auto del_pos = name.find('/');
if (del_pos != std::string::npos) {
Expand Down
6 changes: 3 additions & 3 deletions phlex/core/declared_unfold.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@ namespace phlex::detail {
tbb::flow::multifunction_node<messages_t<num_inputs>,
std::tuple<message, index_message, unfold_flush>>
unfold_;
std::atomic<std::size_t> msg_counter_{}; // Is this sufficient? Probably not.
std::atomic<std::size_t> calls_{};
std::atomic<std::size_t> product_count_{};
std::atomic<std::size_t> msg_counter_; // Is this sufficient? Probably not.
std::atomic<std::size_t> calls_;
std::atomic<std::size_t> product_count_;
};
}

Expand Down
4 changes: 2 additions & 2 deletions phlex/core/detail/repeater_node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ namespace phlex::detail::internal {

struct cached_product {
std::shared_ptr<message> data_msg;
tbb::concurrent_queue<std::size_t> msg_ids{};
tbb::concurrent_queue<std::size_t> msg_ids;
std::atomic<int> counter;
std::atomic_flag flush_received{};
std::atomic_flag flush_received;
};

using cache_t = tbb::concurrent_hash_map<std::size_t, cached_product>; // Key is the index hash
Expand Down
12 changes: 6 additions & 6 deletions phlex/core/framework_graph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,17 +190,17 @@ namespace phlex::detail {
enum class driver_mode { default_driver, deferred_driver };
explicit framework_graph(driver_mode mode, int max_parallelism);

resource_usage graph_resource_usage_{};
resource_usage graph_resource_usage_;
max_allowed_parallelism parallelism_limit_;
fixed_hierarchy fixed_hierarchy_;
data_layer_hierarchy hierarchy_{};
node_catalog nodes_{};
std::map<std::string, filter> filters_{};
node_catalog nodes_;
std::map<std::string, filter> filters_;
// The graph_ object uses the filters_, nodes_, and hierarchy_ objects implicitly.
tbb::flow::graph graph_{};
std::optional<framework_driver> driver_{};
std::vector<std::string> registration_errors_{};
data_cell_tracker cell_tracker_{};
std::optional<framework_driver> driver_;
std::vector<std::string> registration_errors_;
data_cell_tracker cell_tracker_;
tbb::flow::input_node<ready_flushes_then_emit> src_;
index_router index_router_;
tbb::flow::function_node<ready_flushes_then_emit, data_cell_index_ptr, tbb::flow::lightweight>
Expand Down
2 changes: 1 addition & 1 deletion phlex/core/index_router.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ namespace phlex::detail {

tbb::flow::function_node<index_message, data_cell_index_ptr> unfold_index_receiver_;
tbb::flow::function_node<unfold_flush> unfold_flush_receiver_;
std::atomic<std::size_t> received_indices_{};
std::atomic<std::size_t> received_indices_;
flusher_t flusher_;
tbb::concurrent_unordered_map<std::size_t, bool> is_lowest_layer_hashes_;
std::vector<phlex::experimental::identifier> unfold_input_layer_names_;
Expand Down
16 changes: 8 additions & 8 deletions phlex/core/node_catalog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,14 @@ namespace phlex::detail {
std::vector<products_consumer*> consumers() const;
producer_catalog producers() const;

simple_ptr_map<declared_predicate_ptr> predicates{};
simple_ptr_map<declared_observer_ptr> observers{};
simple_ptr_map<declared_output_ptr> outputs{};
simple_ptr_map<declared_fold_ptr> folds{};
simple_ptr_map<declared_unfold_ptr> unfolds{};
simple_ptr_map<declared_transform_ptr> transforms{};
simple_ptr_map<provider_node_ptr> providers{};
simple_ptr_map<source_ptr> sources{};
simple_ptr_map<declared_predicate_ptr> predicates;
simple_ptr_map<declared_observer_ptr> observers;
simple_ptr_map<declared_output_ptr> outputs;
simple_ptr_map<declared_fold_ptr> folds;
simple_ptr_map<declared_unfold_ptr> unfolds;
simple_ptr_map<declared_transform_ptr> transforms;
simple_ptr_map<provider_node_ptr> providers;
simple_ptr_map<source_ptr> sources;

private:
template <typename>
Expand Down
2 changes: 1 addition & 1 deletion phlex/core/registrar.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ namespace phlex::detail {
std::vector<std::string>* errors_;
node_creator creator_{};
std::optional<std::vector<std::string>> predicates_;
std::vector<std::string> output_product_suffixes_{};
std::vector<std::string> output_product_suffixes_;
};
}

Expand Down
2 changes: 1 addition & 1 deletion phlex/core/store_counters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace phlex::detail {
using counts_t =
tbb::concurrent_unordered_map<data_cell_index::hash_type, std::atomic<std::size_t>>;

counts_t counts_{};
counts_t counts_;
#ifdef __cpp_lib_atomic_shared_ptr
std::atomic<data_cell_counts_const_ptr> flush_counts_{nullptr};
#else
Expand Down
2 changes: 1 addition & 1 deletion phlex/model/data_layer_hierarchy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ namespace phlex::detail {
phlex::experimental::identifier name;
phlex::experimental::layer_path layer_path;
std::size_t parent_hash;
std::atomic<std::size_t> count{};
std::atomic<std::size_t> count;
};

tbb::concurrent_unordered_map<std::size_t, std::shared_ptr<layer_entry>> layers_;
Expand Down
2 changes: 1 addition & 1 deletion phlex/model/flush_messages.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace phlex::detail {
// The `ready_flushes_then_emit` struct carries flushes that must be emitted
// (to close out already-emitted indices) before emitting `index_to_emit`.
struct PHLEX_MODEL_EXPORT ready_flushes_then_emit {
index_flushes ready_flushes{};
index_flushes ready_flushes;
data_cell_index_ptr index_to_emit{nullptr};
};
}
Expand Down
6 changes: 3 additions & 3 deletions phlex/model/index_generator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace phlex {
using handle_type = std::coroutine_handle<promise_type>;

struct promise_type {
data_cell_index_ptr current_{};
data_cell_index_ptr current_;
std::exception_ptr exception_{};

index_generator get_return_object()
Expand Down Expand Up @@ -93,7 +93,7 @@ namespace phlex {
}

private:
handle_type coroutine_{};
handle_type coroutine_;
};

index_generator() noexcept = default;
Expand Down Expand Up @@ -148,7 +148,7 @@ namespace phlex {
std::default_sentinel_t end() const noexcept { return {}; }

private:
handle_type coroutine_{};
handle_type coroutine_;
};
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion phlex/model/product_store.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace phlex::experimental {
static experimental::algorithm_name default_source();

private:
phlex::detail::products products_{};
phlex::detail::products products_;
data_cell_index_ptr id_;
algorithm_name
source_; // FIXME: Should not have to copy (the source should outlive the product store)
Expand Down
2 changes: 1 addition & 1 deletion test/replicated.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace {
// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
std::atomic<unsigned int> processed_messages{};
struct thread_unsafe {
std::atomic<unsigned int> counter{};
std::atomic<unsigned int> counter;

auto increment(unsigned int i)
{
Expand Down
Loading