[clang] Feat/suppress leak reports (PR #199240)
DonĂ¡t Nagy via cfe-commits
cfe-commits at lists.llvm.org
Tue May 26 09:50:35 PDT 2026
================
@@ -3024,8 +3028,15 @@ void MallocChecker::HandleLeak(SymbolRef Sym, ExplodedNode *N,
assert(RS && "cannot leak an untracked symbol");
AllocationFamily Family = RS->getAllocationFamily();
- if (Family.Kind == AF_Alloca)
- return;
+ // --- BEGIN: Suppress leak reports for selected ownership types ---
+ if (Family.Kind == AF_Custom && Family.CustomName) {
+ StringRef Type = *Family.CustomName;
+
+ if (llvm::is_contained(this->SuppressLeakTypes, Type)) {
+ return;
+ }
+ }
+ // --- END ---
----------------
NagyDonat wrote:
This AI-generated comment is obsolete, perhaps it refers to an earlier version of this patch.
https://github.com/llvm/llvm-project/pull/199240
More information about the cfe-commits
mailing list