chore: Enable clang-tidy bugprone-use-after-move check (#6476)

This commit is contained in:
Alex Kremer
2026-03-18 00:12:06 +00:00
committed by GitHub
parent 808e814489
commit 2a325e7e2c
7 changed files with 43 additions and 38 deletions

View File

@@ -351,7 +351,7 @@ public:
Buffer b(1);
BEAST_EXPECT(!b.empty());
st[sf4] = std::move(b);
BEAST_EXPECT(b.empty());
BEAST_EXPECT(b.empty()); // NOLINT(bugprone-use-after-move)
BEAST_EXPECT(Slice(st[sf4]).size() == 1);
st[~sf4] = std::nullopt;
BEAST_EXPECT(!~st[~sf4]);
@@ -370,7 +370,7 @@ public:
BEAST_EXPECT(!!~st[~sf5]);
Buffer b(1);
st[sf5] = std::move(b);
BEAST_EXPECT(b.empty());
BEAST_EXPECT(b.empty()); // NOLINT(bugprone-use-after-move)
BEAST_EXPECT(Slice(st[sf5]).size() == 1);
st[~sf4] = std::nullopt;
BEAST_EXPECT(!~st[~sf4]);