SERVER-77158 enable low risk clang tidy perf rules

This commit is contained in:
Matt Boros 2023-09-19 21:14:49 +00:00 committed by Evergreen Agent
parent 826cd336af
commit 6bca906425
8 changed files with 11 additions and 20 deletions

View File

@ -58,6 +58,9 @@ Checks: '-*,
performance-implicit-conversion-in-loop,
performance-inefficient-algorithm,
performance-no-automatic-move,
performance-type-promotion-in-math-fn,
performance-move-constructor-init,
performance-trivially-destructible,
bugprone-signed-char-misuse,
bugprone-suspicious-string-compare,
performance-for-range-copy,
@ -114,8 +117,6 @@ Checks: '-*,
-modernize-use-uncaught-exceptions,
-performance-inefficient-string-concatenation,
-performance-inefficient-vector-operation,
-performance-move-constructor-init,
-performance-type-promotion-in-math-fn,
-performance-unnecessary-value-param,
-readability-delete-null-pointer,
-readability-deleted-default,

View File

@ -324,8 +324,6 @@ void getSplitCandidatesToEnforceZoneRanges(const ChunkManager& cm,
BalancerChunkSelectionPolicy::BalancerChunkSelectionPolicy(ClusterStatistics* clusterStats)
: _clusterStats(clusterStats) {}
BalancerChunkSelectionPolicy::~BalancerChunkSelectionPolicy() = default;
StatusWith<SplitInfoVector> BalancerChunkSelectionPolicy::selectChunksToSplit(
OperationContext* opCtx) {
auto shardStatsStatus = _clusterStats->getStats(opCtx);

View File

@ -55,8 +55,7 @@ class BalancerChunkSelectionPolicy {
BalancerChunkSelectionPolicy& operator=(const BalancerChunkSelectionPolicy&) = delete;
public:
BalancerChunkSelectionPolicy(ClusterStatistics* clusterStats);
~BalancerChunkSelectionPolicy();
explicit BalancerChunkSelectionPolicy(ClusterStatistics* clusterStats);
/**
* Potentially blocking method, which gives out a set of chunks, which need to be split because

View File

@ -77,10 +77,6 @@ const auto shardingLogging = ServiceContext::declareDecoration<ShardingLogging>(
} // namespace
ShardingLogging::ShardingLogging() = default;
ShardingLogging::~ShardingLogging() = default;
ShardingLogging* ShardingLogging::get(ServiceContext* serviceContext) {
return &shardingLogging(serviceContext);
}

View File

@ -48,11 +48,7 @@ namespace mongo {
* Diagnostic logging of sharding metadata events (changelog and actionlog).
*/
class ShardingLogging {
public:
ShardingLogging();
~ShardingLogging();
/**
* Retrieves the ShardingLogging instance associated with the current service/operation context.
*/

View File

@ -295,9 +295,10 @@ public:
}
}
ScopedCheckedOutSession(ScopedCheckedOutSession&& other)
ScopedCheckedOutSession(ScopedCheckedOutSession&& other) noexcept
: _catalog(other._catalog),
_clientTxnNumberStartedAndProvenance(other._clientTxnNumberStartedAndProvenance),
_clientTxnNumberStartedAndProvenance(
std::move(other._clientTxnNumberStartedAndProvenance)),
_sri(other._sri),
_session(other._session),
_killToken(std::move(other._killToken)) {

View File

@ -93,12 +93,12 @@ TaskExecutorCursor::TaskExecutorCursor(std::shared_ptr<executor::TaskExecutor> e
_processResponse(rcr.opCtx, std::move(response));
}
TaskExecutorCursor::TaskExecutorCursor(TaskExecutorCursor&& other)
TaskExecutorCursor::TaskExecutorCursor(TaskExecutorCursor&& other) noexcept
: _executor(std::move(other._executor)),
_underlyingExecutor(std::move(other._underlyingExecutor)),
_rcr(other._rcr),
_rcr(other._rcr), // NOLINT
_options(std::move(other._options)),
_lsid(other._lsid),
_lsid(other._lsid), // NOLINT
_cmdState(std::move(other._cmdState)),
_cursorId(other._cursorId),
_millisecondsWaiting(other._millisecondsWaiting),

View File

@ -128,7 +128,7 @@ public:
/**
* Move constructor to enable storing cursors in vectors.
*/
TaskExecutorCursor(TaskExecutorCursor&& other);
TaskExecutorCursor(TaskExecutorCursor&& other) noexcept;
/**
* Asynchronously kills async ops and kills the underlying cursor on destruction.