================
@@ -546,6 +546,17 @@ void FactsGenerator::handleMovedArgsInCall(const
FunctionDecl *FD,
void FactsGenerator::handleInvalidatingCall(const Expr *Call,
const FunctionDecl *FD,
ArrayRef<const Expr *> Args) {
+ // std::unique_ptr::release() transfers ownership.
+ // Treat it as a move to prevent false-positive warnings when the unique_ptr
+ // destructor runs after ownership has been transferred.
+ if (const auto *Method = dyn_cast<CXXMethodDecl>(FD);
----------------
Xazax-hun wrote:
Nit: maybe this could be moved a bit down, because we already have a check
below if `FD` is a method and an instance call.
https://github.com/llvm/llvm-project/pull/180230
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits