================ @@ -1052,6 +1103,12 @@ static bool isStandardNewDelete(const FunctionDecl *FD) { // Methods of MallocChecker and MallocBugVisitor. //===----------------------------------------------------------------------===// +bool MallocChecker::isFreeingOwnershipAttrCall(const CallEvent &Call) { + const auto *Func = dyn_cast_or_null<FunctionDecl>(Call.getDecl()); + + return Func ? isFreeingOwnershipAttrCall(Func) : false; ---------------- NagyDonat wrote:
```suggestion return Func && isFreeingOwnershipAttrCall(Func); ``` This is a simpler way to express the same boolean operation. https://github.com/llvm/llvm-project/pull/106081 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits