Lines Matching defs:CheckKind
316 enum CheckKind {
708 /// Sets CheckKind to the kind of the checker responsible for this
710 std::optional<CheckKind> getCheckIfTracked(AllocationFamily Family,
713 std::optional<CheckKind> getCheckIfTracked(CheckerContext &C, SymbolRef Sym,
2119 std::optional<MallocChecker::CheckKind>
2154 std::optional<MallocChecker::CheckKind>
2264 std::optional<MallocChecker::CheckKind> CheckKind = getCheckIfTracked(Family);
2265 if (!CheckKind)
2269 if (!BT_BadFree[*CheckKind])
2270 BT_BadFree[*CheckKind].reset(new BugType(
2271 CheckNames[*CheckKind], "Bad free", categories::MemoryError));
2294 auto R = std::make_unique<PathSensitiveBugReport>(*BT_BadFree[*CheckKind],
2305 std::optional<MallocChecker::CheckKind> CheckKind;
2308 CheckKind = CK_MallocChecker;
2310 CheckKind = CK_MismatchedDeallocatorChecker;
2317 if (!BT_FreeAlloca[*CheckKind])
2318 BT_FreeAlloca[*CheckKind].reset(new BugType(
2319 CheckNames[*CheckKind], "Free alloca()", categories::MemoryError));
2322 *BT_FreeAlloca[*CheckKind],
2397 std::optional<MallocChecker::CheckKind> CheckKind = getCheckIfTracked(Family);
2398 if (!CheckKind)
2405 if (!BT_OffsetFree[*CheckKind])
2406 BT_OffsetFree[*CheckKind].reset(new BugType(
2407 CheckNames[*CheckKind], "Offset free", categories::MemoryError));
2438 auto R = std::make_unique<PathSensitiveBugReport>(*BT_OffsetFree[*CheckKind],
2454 std::optional<MallocChecker::CheckKind> CheckKind = getCheckIfTracked(C, Sym);
2455 if (!CheckKind)
2459 if (!BT_UseFree[*CheckKind])
2460 BT_UseFree[*CheckKind].reset(new BugType(
2461 CheckNames[*CheckKind], "Use-after-free", categories::MemoryError));
2467 *BT_UseFree[*CheckKind],
2493 std::optional<MallocChecker::CheckKind> CheckKind = getCheckIfTracked(C, Sym);
2494 if (!CheckKind)
2498 if (!BT_DoubleFree[*CheckKind])
2499 BT_DoubleFree[*CheckKind].reset(new BugType(
2500 CheckNames[*CheckKind], "Double free", categories::MemoryError));
2503 *BT_DoubleFree[*CheckKind],
2523 std::optional<MallocChecker::CheckKind> CheckKind = getCheckIfTracked(C, Sym);
2524 if (!CheckKind)
2550 std::optional<MallocChecker::CheckKind> CheckKind = getCheckIfTracked(C, Sym);
2552 if (!CheckKind)
2556 if (!BT_UseZerroAllocated[*CheckKind])
2557 BT_UseZerroAllocated[*CheckKind].reset(
2558 new BugType(CheckNames[*CheckKind], "Use of zero allocated",
2562 *BT_UseZerroAllocated[*CheckKind],
2583 std::optional<MallocChecker::CheckKind> CheckKind = getCheckIfTracked(Family);
2584 if (!CheckKind)
2588 if (!BT_BadFree[*CheckKind])
2589 BT_BadFree[*CheckKind].reset(new BugType(
2590 CheckNames[*CheckKind], "Bad free", categories::MemoryError));
2605 auto R = std::make_unique<PathSensitiveBugReport>(*BT_BadFree[*CheckKind],
2794 std::optional<MallocChecker::CheckKind> CheckKind =
2797 if (!CheckKind)
2801 if (!BT_Leak[*CheckKind]) {
2807 BT_Leak[*CheckKind].reset(new BugType(CheckNames[*CheckKind], "Memory leak",
2836 *BT_Leak[*CheckKind], os.str(), N, LocUsedForUniqueing,
3632 std::optional<MallocChecker::CheckKind> CheckKind =
3634 if (!CheckKind)
3635 CheckKind = getCheckIfTracked(Family, true);
3640 if (CheckKind)
3641 Out << " (" << CheckNames[*CheckKind].getName() << ")";