[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

Balazs Benics via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 17 11:25:35 PDT 2024


================
@@ -1122,7 +1157,7 @@ MallocChecker::performKernelMalloc(const CallEvent &Call, CheckerContext &C,
   if (TrueState && !FalseState) {
     SVal ZeroVal = C.getSValBuilder().makeZeroVal(Ctx.CharTy);
     return MallocMemAux(C, Call, Call.getArgExpr(0), ZeroVal, TrueState,
-                        AF_Malloc);
+                        AllocationFamily(AF_Malloc));
----------------
steakhal wrote:

Now I get what you meant when pushed back on adding `explicit`. I didn't expect this to cause such a widespread effect. Sorry. Now that you made all the necessary changes, we can keep it as-is. You decide if you prefer reverting these back. I'm good either way.

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


More information about the cfe-commits mailing list