diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-09-26 14:03:28 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-09-26 16:53:35 +0200 |
commit | 845744929e40dbdc81ed9c7df0152d58bbb28be6 (patch) | |
tree | 547a56ebab04ce4b544897944303c2480c71fba7 | |
parent | 02a05d4f759dd72e8b20178b0ac048ccb0a2755e (diff) | |
download | justbuild-845744929e40dbdc81ed9c7df0152d58bbb28be6.tar.gz |
Fix automatic moves proposed by clang-tidy.
Enable performance-no-automatic-move check.
-rw-r--r-- | .clang-tidy | 2 | ||||
-rw-r--r-- | src/buildtool/execution_api/bazel_msg/bazel_msg_factory.cpp | 2 | ||||
-rw-r--r-- | src/buildtool/execution_api/remote/bazel/bazel_network_reader.cpp | 2 | ||||
-rw-r--r-- | src/buildtool/execution_api/remote/bazel/bazel_response.cpp | 2 | ||||
-rw-r--r-- | src/buildtool/storage/large_object_cas.tpp | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/.clang-tidy b/.clang-tidy index 282df112..4fff4a14 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,6 +1,6 @@ FormatStyle: Google Checks: '*,-abseil-*,-altera-*,-android-*,-boost-*,-cert-*,-darwin-*,-fuchsia-*,-linuxkernel-*,-llvm-*,-llvmlibc-*,-mpi-*,-objc-*,-zircon-*' -WarningsAsErrors: 'clang-diagnostic-*,-clang-diagnostic-unused-command-line-argument,clang-analyzer-*,-clang-analyzer-cplusplus.NewDeleteLeaks,-clang-analyzer-cplusplus.StringChecker,bugprone-*,-bugprone-easily-swappable-parameters,-bugprone-unchecked-optional-access,-bugprone-narrowing-conversions,-bugprone-unhandled-exception-at-new,-bugprone-empty-catch,-bugprone-optional-value-conversion,-bugprone-implicit-widening-of-multiplication-result,-bugprone-exception-escape,portability-*,hicpp-*,performance-*,-performance-avoid-endl,-performance-enum-size,-performance-no-automatic-move' +WarningsAsErrors: 'clang-diagnostic-*,-clang-diagnostic-unused-command-line-argument,clang-analyzer-*,-clang-analyzer-cplusplus.NewDeleteLeaks,-clang-analyzer-cplusplus.StringChecker,bugprone-*,-bugprone-easily-swappable-parameters,-bugprone-unchecked-optional-access,-bugprone-narrowing-conversions,-bugprone-unhandled-exception-at-new,-bugprone-empty-catch,-bugprone-optional-value-conversion,-bugprone-implicit-widening-of-multiplication-result,-bugprone-exception-escape,portability-*,hicpp-*,performance-*,-performance-avoid-endl,-performance-enum-size' CheckOptions: [ { key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic, 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 1992961d..58059156 100644 --- a/src/buildtool/execution_api/bazel_msg/bazel_msg_factory.cpp +++ b/src/buildtool/execution_api/bazel_msg/bazel_msg_factory.cpp @@ -305,7 +305,7 @@ auto BazelMsgFactory::CreateDirectoryDigestFromTree( return std::nullopt; } - auto const digest = bundle->blob.digest; + auto digest = bundle->blob.digest; try { if (not process_blob(std::move(bundle->blob))) { return std::nullopt; diff --git a/src/buildtool/execution_api/remote/bazel/bazel_network_reader.cpp b/src/buildtool/execution_api/remote/bazel/bazel_network_reader.cpp index d5f2f3f8..a31939b4 100644 --- a/src/buildtool/execution_api/remote/bazel/bazel_network_reader.cpp +++ b/src/buildtool/execution_api/remote/bazel/bazel_network_reader.cpp @@ -238,7 +238,7 @@ auto BazelNetworkReader::Validate(BazelBlob const& blob) const noexcept } // rehash data - auto const rehashed_info = HashInfo::HashData( + auto rehashed_info = HashInfo::HashData( hash_function_, *blob.data, requested_hash_info->IsTree()); // ensure rehashed data produce the same hash diff --git a/src/buildtool/execution_api/remote/bazel/bazel_response.cpp b/src/buildtool/execution_api/remote/bazel/bazel_response.cpp index 7771fa8e..638747cb 100644 --- a/src/buildtool/execution_api/remote/bazel/bazel_response.cpp +++ b/src/buildtool/execution_api/remote/bazel/bazel_response.cpp @@ -237,7 +237,7 @@ auto BazelResponse::Populate() noexcept -> std::optional<std::string> { // have to upload them manually. auto root_digest = UploadTreeMessageDirectories(*tree); if (not root_digest) { - auto const error = + auto error = fmt::format("BazelResponse: {}", root_digest.error()); Logger::Log(LogLevel::Trace, error); return error; diff --git a/src/buildtool/storage/large_object_cas.tpp b/src/buildtool/storage/large_object_cas.tpp index e77f6355..4d2a1a6c 100644 --- a/src/buildtool/storage/large_object_cas.tpp +++ b/src/buildtool/storage/large_object_cas.tpp @@ -39,7 +39,7 @@ template <bool kDoGlobalUplink, ObjectType kType> auto LargeObjectCAS<kDoGlobalUplink, kType>::GetEntryPath( ArtifactDigest const& digest) const noexcept -> std::optional<std::filesystem::path> { - const std::filesystem::path file_path = file_store_.GetPath(digest.hash()); + std::filesystem::path file_path = file_store_.GetPath(digest.hash()); if (FileSystemManager::IsFile(file_path)) { return file_path; } |