[clang-tools-extra] Extend bugprone-use-after-move check to allow custom invalidation functions (PR #170346)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 2 12:40:51 PST 2025
================
@@ -399,7 +409,7 @@ static MoveType determineMoveType(const FunctionDecl *FuncDecl) {
if (FuncDecl->getName() == "forward")
return MoveType::Forward;
- llvm_unreachable("Invalid move type");
+ return MoveType::Invalidation;
----------------
higher-performance wrote:
I can't do this. Name patterns are not necessarily exact string matches. (Notice how we can have `::std::move`, `std::move`, `move`, etc.)
https://github.com/llvm/llvm-project/pull/170346
More information about the cfe-commits
mailing list