Skip to content
Merged
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
2 changes: 2 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Checks:
- '-modernize-use-nodiscard'
- 'performance-*'
- 'portability-*'
- '-portability-template-virtual-member-function'
- 'readability-*'
- '-readability-function-cognitive-complexity'
- '-readability-identifier-length'
Expand Down Expand Up @@ -114,6 +115,7 @@ CheckOptions:
- key: misc-include-cleaner.IgnoreHeaders
value: >-
__[^/]+/.*;
bits/.*;
.*python[0-9.]+/.*;
boost/mp11/detail/.*;
boost/program_options/.*
Expand Down
8 changes: 1 addition & 7 deletions form/persistence/persistence_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "persistence_utils.hpp"
#include "storage/istorage.hpp"

#include <cstring>
#include <memory>
#include <stdexcept>
#include <string>
Expand All @@ -24,12 +23,7 @@ namespace form::detail::experimental {
}
}

persistence_reader::persistence_reader() :
store_reader_(create_storage_reader()),
config_items_(),
tech_settings_() // constructor takes form config
{
}
persistence_reader::persistence_reader() : store_reader_(create_storage_reader()) {}

void persistence_reader::configure_tech_settings(
form::experimental::config::tech_setting_config const& tech_config_settings)
Expand Down
2 changes: 1 addition & 1 deletion form/persistence/persistence_reader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace form::detail::experimental {

std::unique_ptr<i_storage_reader> store_reader_;
form::experimental::config::item_config config_items_;
form::experimental::config::tech_setting_config tech_settings_;
form::experimental::config::tech_setting_config tech_settings_{};
};

} // namespace form::detail::experimental
Expand Down
4 changes: 2 additions & 2 deletions phlex/core/framework_graph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,11 @@ namespace phlex::detail {
fixed_hierarchy fixed_hierarchy_;
// The graph_ object uses the filters_, nodes_, resources_, and hierarchy_ objects implicitly.
// These must be declared before graph_ so that they outlive it during destruction.
data_layer_hierarchy hierarchy_{};
data_layer_hierarchy hierarchy_;
resource_catalog resources_;
node_catalog nodes_;
std::map<std::string, filter> filters_;
tbb::flow::graph graph_{};
tbb::flow::graph graph_;
std::optional<framework_driver> driver_;
std::vector<std::string> registration_errors_;
data_cell_tracker cell_tracker_;
Expand Down
2 changes: 2 additions & 0 deletions phlex/model/fixed_hierarchy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ namespace {
// NOLINTNEXTLINE(performance-unnecessary-value-param)
std::vector<layer_path> unique_paths(std::vector<layer_path> paths)
{
// clang-tidy doesn't recognize the following line as a move, so it produces a false positive.
// NOLINTNEXTLINE(misc-const-correctness)
std::set<layer_path> unique{std::from_range, std::move(paths)};
return {std::from_range, std::move(unique)};
}
Expand Down
1 change: 0 additions & 1 deletion plugins/generate_layers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "phlex/driver.hpp"
#include "plugins/layer_generator.hpp"

#include <memory>
#include <string>

PHLEX_REGISTER_DRIVER(d, config)
Expand Down
2 changes: 1 addition & 1 deletion plugins/python/src/modulewrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ namespace {
break;
}

Py_ssize_t sz = PyUnicode_GetLength(item);
Py_ssize_t const sz = PyUnicode_GetLength(item);
cargs.emplace_back(p, static_cast<std::string::size_type>(sz));
}

Expand Down
1 change: 1 addition & 0 deletions test/accumulator_test.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "phlex/core/detail/accumulator_node.hpp"
#include "phlex/core/message.hpp"
#include "phlex/model/data_cell_index.hpp"
#include "phlex/model/fwd.hpp"
#include "phlex/model/identifier.hpp"
#include "phlex/model/product_specification.hpp"
#include "test/ostream_logger.hpp"
Expand Down
2 changes: 1 addition & 1 deletion test/form/cell_number_vector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ PHLEX_REGISTER_ALGORITHMS(m, config)
m.transform(
"stamp",
[](std::vector<int> const& values) {
thread_local std::mt19937 gen{std::random_device{}()};
static thread_local std::mt19937 gen{std::random_device{}()};
std::this_thread::sleep_for(
std::chrono::microseconds(std::uniform_int_distribution<int>(0, 2000)(gen)));
return values;
Expand Down
2 changes: 2 additions & 0 deletions test/form/form_basics_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1786,6 +1786,8 @@ TEST_CASE("stage: an empty stage is written like any other stage", "[form]")

TEST_CASE("stage: different creators at different stages each get their own stream", "[form]")
{
// False positive: staged_writer::form retains unique_ptr ownership; leak-sanitizer test passes.
// NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks)
auto writer = make_staged_writer({"hits", "showers"});
int const payload = 0;
auto& form = *writer.form;
Expand Down
2 changes: 0 additions & 2 deletions test/multilayer_join_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
#include <gsl/pointers>
#include <oneapi/tbb/flow_graph.h>

#include <memory>
#include <string>
#include <tuple>
#include <utility>
#include <vector>

Expand Down
2 changes: 1 addition & 1 deletion test/replicated_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace {

auto increment(unsigned int i)
{
thread_counter c{counter};
thread_counter const c{counter};
++processed_messages;
return i;
}
Expand Down
1 change: 1 addition & 0 deletions test/yielding_driver_test.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "phlex/model/data_cell_index.hpp"
#include "phlex/model/fwd.hpp"
#include "phlex/model/index_generator.hpp"
#include "phlex/utilities/resumable_driver.hpp"

Expand Down
Loading