Lines Matching refs:CheckKind
182 enum CheckKind { enum in __anone8977cbd0111::MallocChecker
358 Optional<CheckKind> getCheckIfTracked(AllocationFamily Family,
360 Optional<CheckKind> getCheckIfTracked(CheckerContext &C,
363 Optional<CheckKind> getCheckIfTracked(CheckerContext &C, SymbolRef Sym,
1461 Optional<MallocChecker::CheckKind>
1471 return Optional<MallocChecker::CheckKind>(); in getCheckIfTracked()
1483 return Optional<MallocChecker::CheckKind>(); in getCheckIfTracked()
1492 Optional<MallocChecker::CheckKind>
1500 Optional<MallocChecker::CheckKind>
1606 Optional<MallocChecker::CheckKind> CheckKind = in ReportBadFree() local
1608 if (!CheckKind.hasValue()) in ReportBadFree()
1612 if (!BT_BadFree[*CheckKind]) in ReportBadFree()
1613 BT_BadFree[*CheckKind].reset( in ReportBadFree()
1614 new BugType(CheckNames[*CheckKind], "Bad free", "Memory Error")); in ReportBadFree()
1637 auto R = llvm::make_unique<BugReport>(*BT_BadFree[*CheckKind], os.str(), N); in ReportBadFree()
1647 Optional<MallocChecker::CheckKind> CheckKind; in ReportFreeAlloca() local
1650 CheckKind = CK_MallocChecker; in ReportFreeAlloca()
1652 CheckKind = CK_MismatchedDeallocatorChecker; in ReportFreeAlloca()
1657 if (!BT_FreeAlloca[*CheckKind]) in ReportFreeAlloca()
1658 BT_FreeAlloca[*CheckKind].reset( in ReportFreeAlloca()
1659 new BugType(CheckNames[*CheckKind], "Free alloca()", "Memory Error")); in ReportFreeAlloca()
1662 *BT_FreeAlloca[*CheckKind], in ReportFreeAlloca()
1734 Optional<MallocChecker::CheckKind> CheckKind = in ReportOffsetFree() local
1736 if (!CheckKind.hasValue()) in ReportOffsetFree()
1743 if (!BT_OffsetFree[*CheckKind]) in ReportOffsetFree()
1744 BT_OffsetFree[*CheckKind].reset( in ReportOffsetFree()
1745 new BugType(CheckNames[*CheckKind], "Offset free", "Memory Error")); in ReportOffsetFree()
1776 auto R = llvm::make_unique<BugReport>(*BT_OffsetFree[*CheckKind], os.str(), N); in ReportOffsetFree()
1789 Optional<MallocChecker::CheckKind> CheckKind = getCheckIfTracked(C, Sym); in ReportUseAfterFree() local
1790 if (!CheckKind.hasValue()) in ReportUseAfterFree()
1794 if (!BT_UseFree[*CheckKind]) in ReportUseAfterFree()
1795 BT_UseFree[*CheckKind].reset(new BugType( in ReportUseAfterFree()
1796 CheckNames[*CheckKind], "Use-after-free", "Memory Error")); in ReportUseAfterFree()
1798 auto R = llvm::make_unique<BugReport>(*BT_UseFree[*CheckKind], in ReportUseAfterFree()
1816 Optional<MallocChecker::CheckKind> CheckKind = getCheckIfTracked(C, Sym); in ReportDoubleFree() local
1817 if (!CheckKind.hasValue()) in ReportDoubleFree()
1821 if (!BT_DoubleFree[*CheckKind]) in ReportDoubleFree()
1822 BT_DoubleFree[*CheckKind].reset( in ReportDoubleFree()
1823 new BugType(CheckNames[*CheckKind], "Double free", "Memory Error")); in ReportDoubleFree()
1826 *BT_DoubleFree[*CheckKind], in ReportDoubleFree()
1844 Optional<MallocChecker::CheckKind> CheckKind = getCheckIfTracked(C, Sym); in ReportDoubleDelete() local
1845 if (!CheckKind.hasValue()) in ReportDoubleDelete()
1870 Optional<MallocChecker::CheckKind> CheckKind = getCheckIfTracked(C, Sym); in ReportUseZeroAllocated() local
1872 if (!CheckKind.hasValue()) in ReportUseZeroAllocated()
1876 if (!BT_UseZerroAllocated[*CheckKind]) in ReportUseZeroAllocated()
1877 BT_UseZerroAllocated[*CheckKind].reset(new BugType( in ReportUseZeroAllocated()
1878 CheckNames[*CheckKind], "Use of zero allocated", "Memory Error")); in ReportUseZeroAllocated()
1880 auto R = llvm::make_unique<BugReport>(*BT_UseZerroAllocated[*CheckKind], in ReportUseZeroAllocated()
2072 Optional<MallocChecker::CheckKind> in reportLeak()
2073 CheckKind = getCheckIfTracked(Family, true); in reportLeak() local
2075 if (!CheckKind.hasValue()) in reportLeak()
2079 if (!BT_Leak[*CheckKind]) { in reportLeak()
2080 BT_Leak[*CheckKind].reset( in reportLeak()
2081 new BugType(CheckNames[*CheckKind], "Memory leak", "Memory Error")); in reportLeak()
2087 BT_Leak[*CheckKind]->setSuppressOnSink(true); in reportLeak()
2119 *BT_Leak[*CheckKind], os.str(), N, LocUsedForUniqueing, in reportLeak()
2715 Optional<MallocChecker::CheckKind> CheckKind = getCheckIfTracked(Family); in printState() local
2716 if (!CheckKind.hasValue()) in printState()
2717 CheckKind = getCheckIfTracked(Family, true); in printState()
2722 if (CheckKind.hasValue()) in printState()
2723 Out << " (" << CheckNames[*CheckKind].getName() << ")"; in printState()