Lines Matching refs:CStringChecker
1 //= CStringChecker.h - Checks calls to C string functions ----------*- C++ -*-//
10 // This defines CStringChecker, which is an assortment of checks on calls
27 class CStringChecker : public Checker< eval::Call,
52 typedef void (CStringChecker::*FnCheck)(CheckerContext &,
156 static void *GDMIndex() { return CStringChecker::getTag(); }
166 CStringChecker::assumeZero(CheckerContext &C, const GRState *state, SVal V,
177 const GRState *CStringChecker::checkNonNull(CheckerContext &C,
217 const GRState *CStringChecker::CheckLocation(CheckerContext &C,
290 const GRState *CStringChecker::CheckBufferAccess(CheckerContext &C,
362 const GRState *CStringChecker::CheckOverlap(CheckerContext &C,
473 void CStringChecker::emitOverlapBug(CheckerContext &C, const GRState *state,
492 const GRState *CStringChecker::checkAdditionOverflow(CheckerContext &C,
560 const GRState *CStringChecker::setCStringLength(const GRState *state,
600 SVal CStringChecker::getCStringLengthForRegion(CheckerContext &C,
616 SVal strLength = svalBuilder.getMetadataSymbolVal(CStringChecker::getTag(),
625 SVal CStringChecker::getCStringLength(CheckerContext &C, const GRState *&state,
719 const StringLiteral *CStringChecker::getCStringLiteral(CheckerContext &C,
739 const GRState *CStringChecker::InvalidateBuffer(CheckerContext &C,
770 bool CStringChecker::SummarizeRegion(llvm::raw_ostream& os, ASTContext& Ctx,
813 void CStringChecker::evalCopyCommon(CheckerContext &C,
913 void CStringChecker::evalMemcpy(CheckerContext &C, const CallExpr *CE) const {
922 void CStringChecker::evalMempcpy(CheckerContext &C, const CallExpr *CE) const {
931 void CStringChecker::evalMemmove(CheckerContext &C, const CallExpr *CE) const {
940 void CStringChecker::evalBcopy(CheckerContext &C, const CallExpr *CE) const {
946 void CStringChecker::evalMemcmp(CheckerContext &C, const CallExpr *CE) const {
1014 void CStringChecker::evalstrLength(CheckerContext &C,
1020 void CStringChecker::evalstrnLength(CheckerContext &C,
1026 void CStringChecker::evalstrLengthCommon(CheckerContext &C, const CallExpr *CE,
1150 void CStringChecker::evalStrcpy(CheckerContext &C, const CallExpr *CE) const {
1158 void CStringChecker::evalStrncpy(CheckerContext &C, const CallExpr *CE) const {
1166 void CStringChecker::evalStpcpy(CheckerContext &C, const CallExpr *CE) const {
1174 void CStringChecker::evalStrcat(CheckerContext &C, const CallExpr *CE) const {
1182 void CStringChecker::evalStrncat(CheckerContext &C, const CallExpr *CE) const {
1190 void CStringChecker::evalStrcpyCommon(CheckerContext &C, const CallExpr *CE,
1492 void CStringChecker::evalStrcmp(CheckerContext &C, const CallExpr *CE) const {
1497 void CStringChecker::evalStrncmp(CheckerContext &C, const CallExpr *CE) const {
1502 void CStringChecker::evalStrcasecmp(CheckerContext &C,
1508 void CStringChecker::evalStrncasecmp(CheckerContext &C,
1514 void CStringChecker::evalStrcmpCommon(CheckerContext &C, const CallExpr *CE,
1640 bool CStringChecker::evalCall(const CallExpr *CE, CheckerContext &C) const {
1659 .Cases("memcpy", "__memcpy_chk", &CStringChecker::evalMemcpy)
1660 .Cases("mempcpy", "__mempcpy_chk", &CStringChecker::evalMempcpy)
1661 .Cases("memcmp", "bcmp", &CStringChecker::evalMemcmp)
1662 .Cases("memmove", "__memmove_chk", &CStringChecker::evalMemmove)
1663 .Cases("strcpy", "__strcpy_chk", &CStringChecker::evalStrcpy)
1664 .Cases("strncpy", "__strncpy_chk", &CStringChecker::evalStrncpy)
1665 .Cases("stpcpy", "__stpcpy_chk", &CStringChecker::evalStpcpy)
1666 .Cases("strcat", "__strcat_chk", &CStringChecker::evalStrcat)
1667 .Cases("strncat", "__strncat_chk", &CStringChecker::evalStrncat)
1668 .Case("strlen", &CStringChecker::evalstrLength)
1669 .Case("strnlen", &CStringChecker::evalstrnLength)
1670 .Case("strcmp", &CStringChecker::evalStrcmp)
1671 .Case("strncmp", &CStringChecker::evalStrncmp)
1672 .Case("strcasecmp", &CStringChecker::evalStrcasecmp)
1673 .Case("strncasecmp", &CStringChecker::evalStrncasecmp)
1674 .Case("bcopy", &CStringChecker::evalBcopy)
1690 void CStringChecker::checkPreStmt(const DeclStmt *DS, CheckerContext &C) const {
1726 bool CStringChecker::wantsRegionChangeUpdate(const GRState *state) const {
1732 CStringChecker::checkRegionChanges(const GRState *state,
1782 void CStringChecker::checkLiveSymbols(const GRState *state,
1797 void CStringChecker::checkDeadSymbols(SymbolReaper &SR,
1822 mgr.registerChecker<CStringChecker>();