Skip to content

Commit f345dc3

Browse files
committed
tidy: enable bugprone-use-after-move
Will error with: ```bash coins.cpp:102:22: error: 'coin' used after it was moved [bugprone-use-after-move,-warnings-as-errors] (uint32_t)coin.nHeight, ^ coins.cpp:96:21: note: move occurred here it->second.coin = std::move(coin); ``` until #25663 is merged. See: https://releases.llvm.org/14.0.0/tools/clang/tools/extra/docs/clang-tidy/checks/bugprone-use-after-move.html
1 parent 94f2235 commit f345dc3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/.clang-tidy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Checks: '
22
-*,
33
bugprone-argument-comment,
4+
bugprone-use-after-move,
45
misc-unused-using-decls,
56
modernize-use-default-member-init,
67
modernize-use-nullptr,
@@ -11,6 +12,7 @@ readability-redundant-string-init,
1112
'
1213
WarningsAsErrors: '
1314
bugprone-argument-comment,
15+
bugprone-use-after-move,
1416
misc-unused-using-decls,
1517
modernize-use-default-member-init,
1618
modernize-use-nullptr,

0 commit comments

Comments
 (0)