[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 13 12:03:17 PDT 2025


vbvictor wrote:

I agree that modelling `assert(sp.use_count() == 1);` is not easy in `clang-tidy` itself. In one of my checks I needed to check that two `declStmt` are placed one after another in `compoundStmt` and I ended up manually traversing all `stmt` within `compoundStmt` - not a very pleasant solution.
`clang static analyzer` has built-in functionality for modelling `assert()` and other macros, but `clang-tidy` doesn't

https://github.com/llvm/llvm-project/pull/67467


More information about the cfe-commits mailing list