mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-29 11:10:40 +00:00
before this change, `partition_version` uses a hand-crafted move constructor. but it suffers from the warning from clang-tidy, which believe there is a use-after-move issue, as the inner instance of it's parent class is constructed using `anchorless_list_base_hook(std::move(pv))`, and its other member variables are initialized like `_partition(std::move(pv._partition))` `std::move(pv)` does not do anything, but *indicates* `pv` maybe moved from. and what is moved away is but the part belong to its parent class. so this issue is benign. but, it's still annoying. as we need to tell the genuine issues reported by clang-tidy from the false alarms. so we have at least two options: - stop using clang-tidy - ignore this warning - silence this warning using LINT direction in a comment - use another way to implement the move constructor in this change, we just cast the moved instance to its base class and move it instead, this should applease clang-tidy. Fixes #18354 Signed-off-by: Kefu Chai <kefu.chai@scylladb.com> Closes scylladb/scylladb#18359