Lines Matching refs:CheckKind
192 enum CheckKind { enum in __anon98725bea0111::MallocChecker
397 Optional<CheckKind> getCheckIfTracked(AllocationFamily Family,
399 Optional<CheckKind> getCheckIfTracked(CheckerContext &C,
402 Optional<CheckKind> getCheckIfTracked(CheckerContext &C, SymbolRef Sym,
1636 Optional<MallocChecker::CheckKind>
1671 Optional<MallocChecker::CheckKind>
1679 Optional<MallocChecker::CheckKind>
1785 Optional<MallocChecker::CheckKind> CheckKind = in ReportBadFree() local
1787 if (!CheckKind.hasValue()) in ReportBadFree()
1791 if (!BT_BadFree[*CheckKind]) in ReportBadFree()
1792 BT_BadFree[*CheckKind].reset(new BugType( in ReportBadFree()
1793 CheckNames[*CheckKind], "Bad free", categories::MemoryError)); in ReportBadFree()
1816 auto R = llvm::make_unique<BugReport>(*BT_BadFree[*CheckKind], os.str(), N); in ReportBadFree()
1826 Optional<MallocChecker::CheckKind> CheckKind; in ReportFreeAlloca() local
1829 CheckKind = CK_MallocChecker; in ReportFreeAlloca()
1831 CheckKind = CK_MismatchedDeallocatorChecker; in ReportFreeAlloca()
1836 if (!BT_FreeAlloca[*CheckKind]) in ReportFreeAlloca()
1837 BT_FreeAlloca[*CheckKind].reset(new BugType( in ReportFreeAlloca()
1838 CheckNames[*CheckKind], "Free alloca()", categories::MemoryError)); in ReportFreeAlloca()
1841 *BT_FreeAlloca[*CheckKind], in ReportFreeAlloca()
1913 Optional<MallocChecker::CheckKind> CheckKind = in ReportOffsetFree() local
1915 if (!CheckKind.hasValue()) in ReportOffsetFree()
1922 if (!BT_OffsetFree[*CheckKind]) in ReportOffsetFree()
1923 BT_OffsetFree[*CheckKind].reset(new BugType( in ReportOffsetFree()
1924 CheckNames[*CheckKind], "Offset free", categories::MemoryError)); in ReportOffsetFree()
1955 auto R = llvm::make_unique<BugReport>(*BT_OffsetFree[*CheckKind], os.str(), N); in ReportOffsetFree()
1969 Optional<MallocChecker::CheckKind> CheckKind = getCheckIfTracked(C, Sym); in ReportUseAfterFree() local
1970 if (!CheckKind.hasValue()) in ReportUseAfterFree()
1974 if (!BT_UseFree[*CheckKind]) in ReportUseAfterFree()
1975 BT_UseFree[*CheckKind].reset(new BugType( in ReportUseAfterFree()
1976 CheckNames[*CheckKind], "Use-after-free", categories::MemoryError)); in ReportUseAfterFree()
1981 auto R = llvm::make_unique<BugReport>(*BT_UseFree[*CheckKind], in ReportUseAfterFree()
2006 Optional<MallocChecker::CheckKind> CheckKind = getCheckIfTracked(C, Sym); in ReportDoubleFree() local
2007 if (!CheckKind.hasValue()) in ReportDoubleFree()
2011 if (!BT_DoubleFree[*CheckKind]) in ReportDoubleFree()
2012 BT_DoubleFree[*CheckKind].reset(new BugType( in ReportDoubleFree()
2013 CheckNames[*CheckKind], "Double free", categories::MemoryError)); in ReportDoubleFree()
2016 *BT_DoubleFree[*CheckKind], in ReportDoubleFree()
2034 Optional<MallocChecker::CheckKind> CheckKind = getCheckIfTracked(C, Sym); in ReportDoubleDelete() local
2035 if (!CheckKind.hasValue()) in ReportDoubleDelete()
2061 Optional<MallocChecker::CheckKind> CheckKind = getCheckIfTracked(C, Sym); in ReportUseZeroAllocated() local
2063 if (!CheckKind.hasValue()) in ReportUseZeroAllocated()
2067 if (!BT_UseZerroAllocated[*CheckKind]) in ReportUseZeroAllocated()
2068 BT_UseZerroAllocated[*CheckKind].reset( in ReportUseZeroAllocated()
2069 new BugType(CheckNames[*CheckKind], "Use of zero allocated", in ReportUseZeroAllocated()
2072 auto R = llvm::make_unique<BugReport>(*BT_UseZerroAllocated[*CheckKind], in ReportUseZeroAllocated()
2090 Optional<MallocChecker::CheckKind> CheckKind = getCheckIfTracked(C, FreeExpr); in ReportFunctionPointerFree() local
2091 if (!CheckKind.hasValue()) in ReportFunctionPointerFree()
2095 if (!BT_BadFree[*CheckKind]) in ReportFunctionPointerFree()
2096 BT_BadFree[*CheckKind].reset(new BugType( in ReportFunctionPointerFree()
2097 CheckNames[*CheckKind], "Bad free", categories::MemoryError)); in ReportFunctionPointerFree()
2112 auto R = llvm::make_unique<BugReport>(*BT_BadFree[*CheckKind], Os.str(), N); in ReportFunctionPointerFree()
2296 Optional<MallocChecker::CheckKind> in reportLeak()
2297 CheckKind = getCheckIfTracked(Family, true); in reportLeak() local
2299 if (!CheckKind.hasValue()) in reportLeak()
2303 if (!BT_Leak[*CheckKind]) { in reportLeak()
2304 BT_Leak[*CheckKind].reset(new BugType(CheckNames[*CheckKind], "Memory leak", in reportLeak()
2311 BT_Leak[*CheckKind]->setSuppressOnSink(true); in reportLeak()
2338 *BT_Leak[*CheckKind], os.str(), N, LocUsedForUniqueing, in reportLeak()
3062 Optional<MallocChecker::CheckKind> CheckKind = getCheckIfTracked(Family); in printState() local
3063 if (!CheckKind.hasValue()) in printState()
3064 CheckKind = getCheckIfTracked(Family, true); in printState()
3069 if (CheckKind.hasValue()) in printState()
3070 Out << " (" << CheckNames[*CheckKind].getName() << ")"; in printState()