mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 14:08:40 +01:00
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
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
Checks: '
|
||||
-*,
|
||||
bugprone-argument-comment,
|
||||
bugprone-use-after-move,
|
||||
misc-unused-using-decls,
|
||||
modernize-use-default-member-init,
|
||||
modernize-use-nullptr,
|
||||
@@ -11,6 +12,7 @@ readability-redundant-string-init,
|
||||
'
|
||||
WarningsAsErrors: '
|
||||
bugprone-argument-comment,
|
||||
bugprone-use-after-move,
|
||||
misc-unused-using-decls,
|
||||
modernize-use-default-member-init,
|
||||
modernize-use-nullptr,
|
||||
|
||||
Reference in New Issue
Block a user