diff options
Diffstat (limited to 'src')
22 files changed, 37 insertions, 35 deletions
diff --git a/src/buildtool/build_engine/expression/evaluator.cpp b/src/buildtool/build_engine/expression/evaluator.cpp index f1a19d4d..a14b367f 100644 --- a/src/buildtool/build_engine/expression/evaluator.cpp +++ b/src/buildtool/build_engine/expression/evaluator.cpp @@ -539,7 +539,7 @@ auto LookupExpr(SubExprEvaluator&& eval, auto EmptyMapExpr(SubExprEvaluator&& /*eval*/, ExpressionPtr const& /*expr*/, - Configuration const & + Configuration const& /*env*/) -> ExpressionPtr { return Expression::kEmptyMap; } diff --git a/src/buildtool/build_engine/expression/expression.cpp b/src/buildtool/build_engine/expression/expression.cpp index 5a161468..61b5f827 100644 --- a/src/buildtool/build_engine/expression/expression.cpp +++ b/src/buildtool/build_engine/expression/expression.cpp @@ -215,10 +215,11 @@ auto Expression::ComputeHash() const noexcept -> std::string { IsResult() or IsNode() or IsName()) { // just hash the JSON representation, but prepend "@" for artifact, // "=" for result, "#" for node, and "$" for name. - std::string prefix{ - IsArtifact() - ? "@" - : IsResult() ? "=" : IsNode() ? "#" : IsName() ? "$" : ""}; + std::string prefix{IsArtifact() ? "@" + : IsResult() ? "=" + : IsNode() ? "#" + : IsName() ? "$" + : ""}; hash = hash_gen_.Run(prefix + ToString()).Bytes(); } else { diff --git a/src/buildtool/build_engine/expression/expression.hpp b/src/buildtool/build_engine/expression/expression.hpp index ffcd01c8..52e67282 100644 --- a/src/buildtool/build_engine/expression/expression.hpp +++ b/src/buildtool/build_engine/expression/expression.hpp @@ -25,7 +25,7 @@ #include "src/utils/cpp/json.hpp" class Expression { - friend auto operator+(Expression const& /*lhs*/, Expression const & /*rhs*/) + friend auto operator+(Expression const& /*lhs*/, Expression const& /*rhs*/) -> Expression; public: diff --git a/src/buildtool/build_engine/target_map/utils.hpp b/src/buildtool/build_engine/target_map/utils.hpp index f805cde3..96bfd1fa 100644 --- a/src/buildtool/build_engine/target_map/utils.hpp +++ b/src/buildtool/build_engine/target_map/utils.hpp @@ -35,7 +35,7 @@ auto obtainTarget(const SubExprEvaluator&, auto keys_expr(const ExpressionPtr& map) -> ExpressionPtr; -auto tree_conflict(const ExpressionPtr & /* map */) +auto tree_conflict(const ExpressionPtr& /* map */) -> std::optional<std::string>; auto getTainted(std::set<std::string>* tainted, diff --git a/src/buildtool/crypto/hash_generator.hpp b/src/buildtool/crypto/hash_generator.hpp index 453a9c06..7ff9e004 100644 --- a/src/buildtool/crypto/hash_generator.hpp +++ b/src/buildtool/crypto/hash_generator.hpp @@ -82,7 +82,7 @@ class HashGenerator { HashGenerator(HashGenerator const&) = delete; HashGenerator(HashGenerator&&) = delete; auto operator=(HashGenerator const&) -> HashGenerator& = delete; - auto operator=(HashGenerator &&) -> HashGenerator& = delete; + auto operator=(HashGenerator&&) -> HashGenerator& = delete; ~HashGenerator() noexcept = default; /// \brief Run hash function on data. diff --git a/src/buildtool/crypto/hash_impl.hpp b/src/buildtool/crypto/hash_impl.hpp index aa5a9559..d37322bd 100644 --- a/src/buildtool/crypto/hash_impl.hpp +++ b/src/buildtool/crypto/hash_impl.hpp @@ -13,7 +13,7 @@ class IHashImpl { IHashImpl(IHashImpl const&) = default; IHashImpl(IHashImpl&&) = default; auto operator=(IHashImpl const&) -> IHashImpl& = default; - auto operator=(IHashImpl &&) -> IHashImpl& = default; + auto operator=(IHashImpl&&) -> IHashImpl& = default; virtual ~IHashImpl() = default; /// \brief Feed data to the incremental hashing. diff --git a/src/buildtool/execution_api/bazel_msg/bazel_msg_factory.cpp b/src/buildtool/execution_api/bazel_msg/bazel_msg_factory.cpp index 9ba1ccff..ff8614f5 100644 --- a/src/buildtool/execution_api/bazel_msg/bazel_msg_factory.cpp +++ b/src/buildtool/execution_api/bazel_msg/bazel_msg_factory.cpp @@ -29,7 +29,7 @@ class IBundle { IBundle(IBundle const&) = delete; IBundle(IBundle&&) = delete; auto operator=(IBundle const&) -> IBundle& = delete; - auto operator=(IBundle &&) -> IBundle& = delete; + auto operator=(IBundle&&) -> IBundle& = delete; virtual ~IBundle() noexcept = default; [[nodiscard]] virtual auto Content() const& noexcept @@ -81,7 +81,7 @@ class SparseBundle final : public IBundle { SparseBundle(SparseBundle const&) = delete; SparseBundle(SparseBundle&&) = delete; auto operator=(SparseBundle const&) -> SparseBundle& = delete; - auto operator=(SparseBundle &&) -> SparseBundle& = delete; + auto operator=(SparseBundle&&) -> SparseBundle& = delete; ~SparseBundle() noexcept final = default; private: @@ -130,7 +130,7 @@ class FullBundle final : public IBundle { FullBundle(FullBundle const&) = delete; FullBundle(FullBundle&&) = delete; auto operator=(FullBundle const&) -> FullBundle& = delete; - auto operator=(FullBundle &&) -> FullBundle& = delete; + auto operator=(FullBundle&&) -> FullBundle& = delete; ~FullBundle() noexcept final = default; private: diff --git a/src/buildtool/execution_api/common/execution_action.hpp b/src/buildtool/execution_api/common/execution_action.hpp index 58176bda..f8b3e181 100644 --- a/src/buildtool/execution_api/common/execution_action.hpp +++ b/src/buildtool/execution_api/common/execution_action.hpp @@ -40,7 +40,7 @@ class IExecutionAction { IExecutionAction(IExecutionAction const&) = delete; IExecutionAction(IExecutionAction&&) = delete; auto operator=(IExecutionAction const&) -> IExecutionAction& = delete; - auto operator=(IExecutionAction &&) -> IExecutionAction& = delete; + auto operator=(IExecutionAction&&) -> IExecutionAction& = delete; virtual ~IExecutionAction() = default; /// \brief Execute the action. diff --git a/src/buildtool/execution_api/common/execution_api.hpp b/src/buildtool/execution_api/common/execution_api.hpp index 92002d48..3f1da5b8 100644 --- a/src/buildtool/execution_api/common/execution_api.hpp +++ b/src/buildtool/execution_api/common/execution_api.hpp @@ -23,7 +23,7 @@ class IExecutionApi { IExecutionApi(IExecutionApi const&) = delete; IExecutionApi(IExecutionApi&&) = default; auto operator=(IExecutionApi const&) -> IExecutionApi& = delete; - auto operator=(IExecutionApi &&) -> IExecutionApi& = default; + auto operator=(IExecutionApi&&) -> IExecutionApi& = default; virtual ~IExecutionApi() = default; /// \brief Create a new action. diff --git a/src/buildtool/execution_api/common/execution_response.hpp b/src/buildtool/execution_api/common/execution_response.hpp index 76349018..09947626 100644 --- a/src/buildtool/execution_api/common/execution_response.hpp +++ b/src/buildtool/execution_api/common/execution_response.hpp @@ -23,7 +23,7 @@ class IExecutionResponse { IExecutionResponse(IExecutionResponse const&) = delete; IExecutionResponse(IExecutionResponse&&) = delete; auto operator=(IExecutionResponse const&) -> IExecutionResponse& = delete; - auto operator=(IExecutionResponse &&) -> IExecutionResponse& = delete; + auto operator=(IExecutionResponse&&) -> IExecutionResponse& = delete; virtual ~IExecutionResponse() = default; [[nodiscard]] virtual auto Status() const noexcept -> StatusCode = 0; diff --git a/src/buildtool/execution_api/local/local_ac.hpp b/src/buildtool/execution_api/local/local_ac.hpp index f8cc3b7a..0378a74d 100644 --- a/src/buildtool/execution_api/local/local_ac.hpp +++ b/src/buildtool/execution_api/local/local_ac.hpp @@ -22,7 +22,7 @@ class LocalAC { LocalAC(LocalAC const&) = delete; LocalAC(LocalAC&&) = delete; auto operator=(LocalAC const&) -> LocalAC& = delete; - auto operator=(LocalAC &&) -> LocalAC& = delete; + auto operator=(LocalAC&&) -> LocalAC& = delete; ~LocalAC() noexcept = default; [[nodiscard]] auto StoreResult( diff --git a/src/buildtool/execution_api/local/local_action.cpp b/src/buildtool/execution_api/local/local_action.cpp index 57a5bc54..0c71a84b 100644 --- a/src/buildtool/execution_api/local/local_action.cpp +++ b/src/buildtool/execution_api/local/local_action.cpp @@ -20,7 +20,7 @@ class BuildCleanupAnchor { BuildCleanupAnchor(BuildCleanupAnchor const&) = delete; BuildCleanupAnchor(BuildCleanupAnchor&&) = delete; auto operator=(BuildCleanupAnchor const&) -> BuildCleanupAnchor& = delete; - auto operator=(BuildCleanupAnchor &&) -> BuildCleanupAnchor& = delete; + auto operator=(BuildCleanupAnchor&&) -> BuildCleanupAnchor& = delete; ~BuildCleanupAnchor() { if (not LocalExecutionConfig::KeepBuildDir() and not FileSystemManager::RemoveDirectory(build_path, true)) { diff --git a/src/buildtool/execution_api/local/local_cas.hpp b/src/buildtool/execution_api/local/local_cas.hpp index f5158662..1b76b72f 100644 --- a/src/buildtool/execution_api/local/local_cas.hpp +++ b/src/buildtool/execution_api/local/local_cas.hpp @@ -23,7 +23,7 @@ class LocalCAS { LocalCAS(LocalCAS const&) = delete; LocalCAS(LocalCAS&&) = delete; auto operator=(LocalCAS const&) -> LocalCAS& = delete; - auto operator=(LocalCAS &&) -> LocalCAS& = delete; + auto operator=(LocalCAS&&) -> LocalCAS& = delete; ~LocalCAS() noexcept = default; [[nodiscard]] auto StoreBlobFromBytes(std::string const& bytes) diff --git a/src/buildtool/execution_api/remote/bazel/bazel_api.hpp b/src/buildtool/execution_api/remote/bazel/bazel_api.hpp index 1405737b..8582db65 100644 --- a/src/buildtool/execution_api/remote/bazel/bazel_api.hpp +++ b/src/buildtool/execution_api/remote/bazel/bazel_api.hpp @@ -26,7 +26,7 @@ class BazelApi final : public IExecutionApi { BazelApi(BazelApi const&) = delete; BazelApi(BazelApi&& other) noexcept; auto operator=(BazelApi const&) -> BazelApi& = delete; - auto operator=(BazelApi &&) -> BazelApi& = delete; + auto operator=(BazelApi&&) -> BazelApi& = delete; ~BazelApi() final; auto CreateAction( diff --git a/src/buildtool/execution_engine/dag/dag.hpp b/src/buildtool/execution_engine/dag/dag.hpp index ff055413..500ff0fc 100644 --- a/src/buildtool/execution_engine/dag/dag.hpp +++ b/src/buildtool/execution_engine/dag/dag.hpp @@ -56,7 +56,7 @@ class DirectedAcyclicGraph { Node(Node const&) = delete; Node(Node&&) = delete; auto operator=(Node const&) -> Node& = delete; - auto operator=(Node &&) -> Node& = delete; + auto operator=(Node&&) -> Node& = delete; [[nodiscard]] auto NodeId() const noexcept -> Id { // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast) @@ -127,7 +127,7 @@ class DirectedAcyclicGraph { NodeTraversalState(NodeTraversalState&&) = delete; auto operator=(NodeTraversalState const&) -> NodeTraversalState& = delete; - auto operator=(NodeTraversalState &&) -> NodeTraversalState& = delete; + auto operator=(NodeTraversalState&&) -> NodeTraversalState& = delete; ~NodeTraversalState() noexcept = default; /// \brief Sets traversal state as discovered @@ -215,7 +215,7 @@ class DependencyGraph : DirectedAcyclicGraph { ActionNodeTraversalState(ActionNodeTraversalState&&) = delete; auto operator=(ActionNodeTraversalState const&) -> ActionNodeTraversalState& = delete; - auto operator=(ActionNodeTraversalState &&) + auto operator=(ActionNodeTraversalState&&) -> ActionNodeTraversalState& = delete; ~ActionNodeTraversalState() noexcept = default; @@ -257,7 +257,7 @@ class DependencyGraph : DirectedAcyclicGraph { ArtifactNodeTraversalState(ArtifactNodeTraversalState&&) = delete; auto operator=(ArtifactNodeTraversalState const&) -> ArtifactNodeTraversalState& = delete; - auto operator=(ArtifactNodeTraversalState &&) + auto operator=(ArtifactNodeTraversalState&&) -> ArtifactNodeTraversalState& = delete; ~ArtifactNodeTraversalState() noexcept = default; @@ -518,7 +518,7 @@ class DependencyGraph : DirectedAcyclicGraph { DependencyGraph(DependencyGraph const&) = delete; DependencyGraph(DependencyGraph&&) = delete; auto operator=(DependencyGraph const&) -> DependencyGraph& = delete; - auto operator=(DependencyGraph &&) -> DependencyGraph& = delete; + auto operator=(DependencyGraph&&) -> DependencyGraph& = delete; ~DependencyGraph() noexcept = default; [[nodiscard]] auto Add(std::vector<ActionDescription> const& actions) diff --git a/src/buildtool/execution_engine/executor/executor.hpp b/src/buildtool/execution_engine/executor/executor.hpp index d21346a0..d46c290b 100644 --- a/src/buildtool/execution_engine/executor/executor.hpp +++ b/src/buildtool/execution_engine/executor/executor.hpp @@ -325,10 +325,10 @@ class ExecutorImpl { if (has_err or has_out) { logger.Emit(LogLevel::Info, [&] { using namespace std::string_literals; - auto message = - (has_err and has_out ? "Stdout and stderr"s - : has_out ? "Stdout"s : "Stderr"s) + - " of command: "; + auto message = (has_err and has_out ? "Stdout and stderr"s + : has_out ? "Stdout"s + : "Stderr"s) + + " of command: "; message += nlohmann::json(command).dump(); if (response->HasStdOut()) { message += "\n" + response->StdOut(); diff --git a/src/buildtool/execution_engine/traverser/traverser.hpp b/src/buildtool/execution_engine/traverser/traverser.hpp index ea44f30c..930cf0fb 100644 --- a/src/buildtool/execution_engine/traverser/traverser.hpp +++ b/src/buildtool/execution_engine/traverser/traverser.hpp @@ -33,7 +33,7 @@ class Traverser { Traverser(Traverser const&) = delete; Traverser(Traverser&&) = delete; auto operator=(Traverser const&) -> Traverser& = delete; - auto operator=(Traverser &&) -> Traverser& = delete; + auto operator=(Traverser&&) -> Traverser& = delete; ~Traverser() = default; // Traverse the whole graph diff --git a/src/buildtool/file_system/file_system_manager.hpp b/src/buildtool/file_system/file_system_manager.hpp index c5618e8b..c5538c49 100644 --- a/src/buildtool/file_system/file_system_manager.hpp +++ b/src/buildtool/file_system/file_system_manager.hpp @@ -31,7 +31,7 @@ class FileSystemManager { public: DirectoryAnchor(DirectoryAnchor const&) = delete; auto operator=(DirectoryAnchor const&) -> DirectoryAnchor& = delete; - auto operator=(DirectoryAnchor &&) -> DirectoryAnchor& = delete; + auto operator=(DirectoryAnchor&&) -> DirectoryAnchor& = delete; ~DirectoryAnchor() noexcept { if (!kRestorePath.empty()) { try { diff --git a/src/buildtool/logging/log_sink.hpp b/src/buildtool/logging/log_sink.hpp index 3c1028cd..d4939dc9 100644 --- a/src/buildtool/logging/log_sink.hpp +++ b/src/buildtool/logging/log_sink.hpp @@ -18,7 +18,7 @@ class ILogSink { ILogSink(ILogSink const&) = delete; ILogSink(ILogSink&&) = delete; auto operator=(ILogSink const&) -> ILogSink& = delete; - auto operator=(ILogSink &&) -> ILogSink& = delete; + auto operator=(ILogSink&&) -> ILogSink& = delete; virtual ~ILogSink() noexcept = default; /// \brief Thread-safe emitting of log messages. diff --git a/src/buildtool/main/main.cpp b/src/buildtool/main/main.cpp index 805cec05..56b31074 100644 --- a/src/buildtool/main/main.cpp +++ b/src/buildtool/main/main.cpp @@ -347,8 +347,9 @@ template <HasToString K, typename V> oss << fmt::format("Cycle detected in {}:", name) << std::endl; for (auto const& k : *cycle) { auto match = (k == cycle->back()); - auto prefix{match ? found ? "`-- "s : ".-> "s - : found ? "| "s : " "s}; + auto prefix{match ? found ? "`-- "s : ".-> "s + : found ? "| "s + : " "s}; oss << prefix << k.ToString() << std::endl; found = found or match; } diff --git a/src/buildtool/multithreading/task_system.hpp b/src/buildtool/multithreading/task_system.hpp index c2e46779..20950142 100644 --- a/src/buildtool/multithreading/task_system.hpp +++ b/src/buildtool/multithreading/task_system.hpp @@ -20,7 +20,7 @@ class TaskSystem { TaskSystem(TaskSystem const&) = delete; TaskSystem(TaskSystem&&) = delete; auto operator=(TaskSystem const&) -> TaskSystem& = delete; - auto operator=(TaskSystem &&) -> TaskSystem& = delete; + auto operator=(TaskSystem&&) -> TaskSystem& = delete; // Destructor calls sets to "done" all notification queues and joins the // threads. Note that joining the threads will wait until the Run method diff --git a/src/utils/cpp/json.hpp b/src/utils/cpp/json.hpp index 8acab817..a231f34b 100644 --- a/src/utils/cpp/json.hpp +++ b/src/utils/cpp/json.hpp @@ -14,7 +14,7 @@ auto ExtractValueAs( nlohmann::json const& j, std::string const& key, std::function<void(std::string const& error)>&& logger = - [](std::string const & /*unused*/) -> void {}) noexcept + [](std::string const& /*unused*/) -> void {}) noexcept -> std::optional<ValueT> { try { auto it = j.find(key); |