[clang] [analyzer] Fix a false memory leak reports involving placement new (PR #144341)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 16 05:39:47 PDT 2025


================
@@ -1371,6 +1371,19 @@ void MallocChecker::checkIfFreeNameIndex(ProgramStateRef State,
   C.addTransition(State);
 }
 
+bool isVoidStar(QualType T) {
+  return !T.isNull() && T->isPointerType() && T->getPointeeType()->isVoidType();
----------------
tbaederr wrote:

There's `isVoidPointerType()`.

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


More information about the cfe-commits mailing list