Lines Matching defs:CheckKind
362 enum CheckKind {
778 /// Sets CheckKind to the kind of the checker responsible for this
780 std::optional<CheckKind> getCheckIfTracked(AllocationFamily Family,
783 std::optional<CheckKind> getCheckIfTracked(CheckerContext &C, SymbolRef Sym,
2323 std::optional<MallocChecker::CheckKind>
2361 std::optional<MallocChecker::CheckKind>
2471 std::optional<MallocChecker::CheckKind> CheckKind = getCheckIfTracked(Family);
2472 if (!CheckKind)
2476 if (!BT_BadFree[*CheckKind])
2477 BT_BadFree[*CheckKind].reset(new BugType(
2478 CheckNames[*CheckKind], "Bad free", categories::MemoryError));
2501 auto R = std::make_unique<PathSensitiveBugReport>(*BT_BadFree[*CheckKind],
2512 std::optional<MallocChecker::CheckKind> CheckKind;
2515 CheckKind = CK_MallocChecker;
2517 CheckKind = CK_MismatchedDeallocatorChecker;
2524 if (!BT_FreeAlloca[*CheckKind])
2525 BT_FreeAlloca[*CheckKind].reset(new BugType(
2526 CheckNames[*CheckKind], "Free 'alloca()'", categories::MemoryError));
2529 *BT_FreeAlloca[*CheckKind],
2606 std::optional<MallocChecker::CheckKind> CheckKind = getCheckIfTracked(Family);
2607 if (!CheckKind)
2614 if (!BT_OffsetFree[*CheckKind])
2615 BT_OffsetFree[*CheckKind].reset(new BugType(
2616 CheckNames[*CheckKind], "Offset free", categories::MemoryError));
2647 auto R = std::make_unique<PathSensitiveBugReport>(*BT_OffsetFree[*CheckKind],
2663 std::optional<MallocChecker::CheckKind> CheckKind = getCheckIfTracked(C, Sym);
2664 if (!CheckKind)
2668 if (!BT_UseFree[*CheckKind])
2669 BT_UseFree[*CheckKind].reset(new BugType(
2670 CheckNames[*CheckKind], "Use-after-free", categories::MemoryError));
2676 *BT_UseFree[*CheckKind],
2702 std::optional<MallocChecker::CheckKind> CheckKind = getCheckIfTracked(C, Sym);
2703 if (!CheckKind)
2707 if (!BT_DoubleFree[*CheckKind])
2708 BT_DoubleFree[*CheckKind].reset(new BugType(
2709 CheckNames[*CheckKind], "Double free", categories::MemoryError));
2712 *BT_DoubleFree[*CheckKind],
2732 std::optional<MallocChecker::CheckKind> CheckKind = getCheckIfTracked(C, Sym);
2733 if (!CheckKind)
2759 std::optional<MallocChecker::CheckKind> CheckKind = getCheckIfTracked(C, Sym);
2761 if (!CheckKind)
2765 if (!BT_UseZerroAllocated[*CheckKind])
2766 BT_UseZerroAllocated[*CheckKind].reset(
2767 new BugType(CheckNames[*CheckKind], "Use of zero allocated",
2771 *BT_UseZerroAllocated[*CheckKind],
2792 std::optional<MallocChecker::CheckKind> CheckKind = getCheckIfTracked(Family);
2793 if (!CheckKind)
2797 if (!BT_BadFree[*CheckKind])
2798 BT_BadFree[*CheckKind].reset(new BugType(
2799 CheckNames[*CheckKind], "Bad free", categories::MemoryError));
2814 auto R = std::make_unique<PathSensitiveBugReport>(*BT_BadFree[*CheckKind],
3005 std::optional<MallocChecker::CheckKind> CheckKind =
3008 if (!CheckKind)
3012 if (!BT_Leak[*CheckKind]) {
3018 BT_Leak[*CheckKind].reset(new BugType(CheckNames[*CheckKind], "Memory leak",
3047 *BT_Leak[*CheckKind], os.str(), N, LocUsedForUniqueing,
3880 std::optional<MallocChecker::CheckKind> CheckKind =
3882 if (!CheckKind)
3883 CheckKind = getCheckIfTracked(Family, true);
3888 if (CheckKind)
3889 Out << " (" << CheckNames[*CheckKind].getName() << ")";