• Home
  • Raw
  • Download

Lines Matching refs:CE

62   bool evalCall(const CallExpr *CE, CheckerContext &C) const;
78 void evalMemcpy(CheckerContext &C, const CallExpr *CE) const;
79 void evalMempcpy(CheckerContext &C, const CallExpr *CE) const;
80 void evalMemmove(CheckerContext &C, const CallExpr *CE) const;
81 void evalBcopy(CheckerContext &C, const CallExpr *CE) const;
82 void evalCopyCommon(CheckerContext &C, const CallExpr *CE,
90 void evalMemcmp(CheckerContext &C, const CallExpr *CE) const;
92 void evalstrLength(CheckerContext &C, const CallExpr *CE) const;
93 void evalstrnLength(CheckerContext &C, const CallExpr *CE) const;
95 const CallExpr *CE,
98 void evalStrcpy(CheckerContext &C, const CallExpr *CE) const;
99 void evalStrncpy(CheckerContext &C, const CallExpr *CE) const;
100 void evalStpcpy(CheckerContext &C, const CallExpr *CE) const;
102 const CallExpr *CE,
107 void evalStrcat(CheckerContext &C, const CallExpr *CE) const;
108 void evalStrncat(CheckerContext &C, const CallExpr *CE) const;
110 void evalStrcmp(CheckerContext &C, const CallExpr *CE) const;
111 void evalStrncmp(CheckerContext &C, const CallExpr *CE) const;
112 void evalStrcasecmp(CheckerContext &C, const CallExpr *CE) const;
113 void evalStrncasecmp(CheckerContext &C, const CallExpr *CE) const;
115 const CallExpr *CE,
119 void evalStrsep(CheckerContext &C, const CallExpr *CE) const;
121 void evalStdCopy(CheckerContext &C, const CallExpr *CE) const;
122 void evalStdCopyBackward(CheckerContext &C, const CallExpr *CE) const;
123 void evalStdCopyCommon(CheckerContext &C, const CallExpr *CE) const;
992 const CallExpr *CE, in evalCopyCommon() argument
1014 stateZeroSize = stateZeroSize->BindExpr(CE, LCtx, destVal); in evalCopyCommon()
1068 state = state->BindExpr(CE, LCtx, lastElement); in evalCopyCommon()
1072 SVal result = C.getSValBuilder().conjureSymbolVal(nullptr, CE, LCtx, in evalCopyCommon()
1074 state = state->BindExpr(CE, LCtx, result); in evalCopyCommon()
1080 state = state->BindExpr(CE, LCtx, destVal); in evalCopyCommon()
1102 void CStringChecker::evalMemcpy(CheckerContext &C, const CallExpr *CE) const { in evalMemcpy()
1103 if (CE->getNumArgs() < 3) in evalMemcpy()
1108 const Expr *Dest = CE->getArg(0); in evalMemcpy()
1111 evalCopyCommon(C, CE, state, CE->getArg(2), Dest, CE->getArg(1), true); in evalMemcpy()
1114 void CStringChecker::evalMempcpy(CheckerContext &C, const CallExpr *CE) const { in evalMempcpy()
1115 if (CE->getNumArgs() < 3) in evalMempcpy()
1120 const Expr *Dest = CE->getArg(0); in evalMempcpy()
1123 evalCopyCommon(C, CE, state, CE->getArg(2), Dest, CE->getArg(1), true, true); in evalMempcpy()
1126 void CStringChecker::evalMemmove(CheckerContext &C, const CallExpr *CE) const { in evalMemmove()
1127 if (CE->getNumArgs() < 3) in evalMemmove()
1132 const Expr *Dest = CE->getArg(0); in evalMemmove()
1135 evalCopyCommon(C, CE, state, CE->getArg(2), Dest, CE->getArg(1)); in evalMemmove()
1138 void CStringChecker::evalBcopy(CheckerContext &C, const CallExpr *CE) const { in evalBcopy()
1139 if (CE->getNumArgs() < 3) in evalBcopy()
1143 evalCopyCommon(C, CE, C.getState(), in evalBcopy()
1144 CE->getArg(2), CE->getArg(1), CE->getArg(0)); in evalBcopy()
1147 void CStringChecker::evalMemcmp(CheckerContext &C, const CallExpr *CE) const { in evalMemcmp()
1148 if (CE->getNumArgs() < 3) in evalMemcmp()
1154 const Expr *Left = CE->getArg(0); in evalMemcmp()
1155 const Expr *Right = CE->getArg(1); in evalMemcmp()
1156 const Expr *Size = CE->getArg(2); in evalMemcmp()
1174 state = state->BindExpr(CE, LCtx, in evalMemcmp()
1175 svalBuilder.makeZeroVal(CE->getType())); in evalMemcmp()
1201 state = StSameBuf->BindExpr(CE, LCtx, in evalMemcmp()
1202 svalBuilder.makeZeroVal(CE->getType())); in evalMemcmp()
1214 SVal CmpV = svalBuilder.conjureSymbolVal(nullptr, CE, LCtx, in evalMemcmp()
1216 state = state->BindExpr(CE, LCtx, CmpV); in evalMemcmp()
1224 const CallExpr *CE) const { in evalstrLength()
1225 if (CE->getNumArgs() < 1) in evalstrLength()
1229 evalstrLengthCommon(C, CE, /* IsStrnlen = */ false); in evalstrLength()
1233 const CallExpr *CE) const { in evalstrnLength()
1234 if (CE->getNumArgs() < 2) in evalstrnLength()
1238 evalstrLengthCommon(C, CE, /* IsStrnlen = */ true); in evalstrnLength()
1241 void CStringChecker::evalstrLengthCommon(CheckerContext &C, const CallExpr *CE, in evalstrLengthCommon() argument
1248 const Expr *maxlenExpr = CE->getArg(1); in evalstrLengthCommon()
1258 SVal zero = C.getSValBuilder().makeZeroVal(CE->getType()); in evalstrLengthCommon()
1259 stateZeroSize = stateZeroSize->BindExpr(CE, LCtx, zero); in evalstrLengthCommon()
1272 const Expr *Arg = CE->getArg(0); in evalstrLengthCommon()
1296 const Expr *maxlenExpr = CE->getArg(1); in evalstrLengthCommon()
1325 result = C.getSValBuilder().conjureSymbolVal(nullptr, CE, LCtx, in evalstrLengthCommon()
1349 result = C.getSValBuilder().conjureSymbolVal(nullptr, CE, LCtx, in evalstrLengthCommon()
1356 state = state->BindExpr(CE, LCtx, result); in evalstrLengthCommon()
1360 void CStringChecker::evalStrcpy(CheckerContext &C, const CallExpr *CE) const { in evalStrcpy()
1361 if (CE->getNumArgs() < 2) in evalStrcpy()
1365 evalStrcpyCommon(C, CE, in evalStrcpy()
1371 void CStringChecker::evalStrncpy(CheckerContext &C, const CallExpr *CE) const { in evalStrncpy()
1372 if (CE->getNumArgs() < 3) in evalStrncpy()
1376 evalStrcpyCommon(C, CE, in evalStrncpy()
1382 void CStringChecker::evalStpcpy(CheckerContext &C, const CallExpr *CE) const { in evalStpcpy()
1383 if (CE->getNumArgs() < 2) in evalStpcpy()
1387 evalStrcpyCommon(C, CE, in evalStpcpy()
1393 void CStringChecker::evalStrcat(CheckerContext &C, const CallExpr *CE) const { in evalStrcat()
1394 if (CE->getNumArgs() < 2) in evalStrcat()
1398 evalStrcpyCommon(C, CE, in evalStrcat()
1404 void CStringChecker::evalStrncat(CheckerContext &C, const CallExpr *CE) const { in evalStrncat()
1405 if (CE->getNumArgs() < 3) in evalStrncat()
1409 evalStrcpyCommon(C, CE, in evalStrncat()
1415 void CStringChecker::evalStrcpyCommon(CheckerContext &C, const CallExpr *CE, in evalStrcpyCommon() argument
1423 const Expr *Dst = CE->getArg(0); in evalStrcpyCommon()
1431 const Expr *srcExpr = CE->getArg(1); in evalStrcpyCommon()
1458 const Expr *lenExpr = CE->getArg(2); in evalStrcpyCommon()
1527 StateZeroSize = StateZeroSize->BindExpr(CE, LCtx, DstVal); in evalStrcpyCommon()
1622 finalStrLength = getCStringLength(C, state, CE, DstVal, true); in evalStrcpyCommon()
1676 state = CheckLocation(C, state, CE->getArg(2), maxLastElement, in evalStrcpyCommon()
1734 Result = svalBuilder.conjureSymbolVal(nullptr, CE, LCtx, C.blockCount()); in evalStrcpyCommon()
1738 state = state->BindExpr(CE, LCtx, Result); in evalStrcpyCommon()
1742 void CStringChecker::evalStrcmp(CheckerContext &C, const CallExpr *CE) const { in evalStrcmp()
1743 if (CE->getNumArgs() < 2) in evalStrcmp()
1747 evalStrcmpCommon(C, CE, /* isBounded = */ false, /* ignoreCase = */ false); in evalStrcmp()
1750 void CStringChecker::evalStrncmp(CheckerContext &C, const CallExpr *CE) const { in evalStrncmp()
1751 if (CE->getNumArgs() < 3) in evalStrncmp()
1755 evalStrcmpCommon(C, CE, /* isBounded = */ true, /* ignoreCase = */ false); in evalStrncmp()
1759 const CallExpr *CE) const { in evalStrcasecmp()
1760 if (CE->getNumArgs() < 2) in evalStrcasecmp()
1764 evalStrcmpCommon(C, CE, /* isBounded = */ false, /* ignoreCase = */ true); in evalStrcasecmp()
1768 const CallExpr *CE) const { in evalStrncasecmp()
1769 if (CE->getNumArgs() < 3) in evalStrncasecmp()
1773 evalStrcmpCommon(C, CE, /* isBounded = */ true, /* ignoreCase = */ true); in evalStrncasecmp()
1776 void CStringChecker::evalStrcmpCommon(CheckerContext &C, const CallExpr *CE, in evalStrcmpCommon() argument
1783 const Expr *s1 = CE->getArg(0); in evalStrcmpCommon()
1790 const Expr *s2 = CE->getArg(1); in evalStrcmpCommon()
1821 StSameBuf = StSameBuf->BindExpr(CE, LCtx, in evalStrcmpCommon()
1822 svalBuilder.makeZeroVal(CE->getType())); in evalStrcmpCommon()
1840 SVal resultVal = svalBuilder.conjureSymbolVal(nullptr, CE, LCtx, in evalStrcmpCommon()
1849 const Expr *lenExpr = CE->getArg(2); in evalStrcmpCommon()
1881 resultVal = svalBuilder.makeIntVal(compareRes, CE->getType()); in evalStrcmpCommon()
1884 DefinedSVal zeroVal = svalBuilder.makeIntVal(0, CE->getType()); in evalStrcmpCommon()
1897 state = state->BindExpr(CE, LCtx, resultVal); in evalStrcmpCommon()
1903 void CStringChecker::evalStrsep(CheckerContext &C, const CallExpr *CE) const { in evalStrsep()
1905 if (CE->getNumArgs() < 2) in evalStrsep()
1909 const Expr *SearchStrPtr = CE->getArg(0); in evalStrsep()
1912 CE->getType().getUnqualifiedType() != CharPtrTy.getUnqualifiedType()) in evalStrsep()
1927 const Expr *DelimStr = CE->getArg(1); in evalStrsep()
1947 SVB.conjureSymbolVal(getTag(), CE, LCtx, CharPtrTy, in evalStrsep()
1952 Result = SVB.conjureSymbolVal(nullptr, CE, LCtx, C.blockCount()); in evalStrsep()
1956 State = State->BindExpr(CE, LCtx, Result); in evalStrsep()
1961 void CStringChecker::evalStdCopy(CheckerContext &C, const CallExpr *CE) const { in evalStdCopy()
1962 evalStdCopyCommon(C, CE); in evalStdCopy()
1966 const CallExpr *CE) const { in evalStdCopyBackward()
1967 evalStdCopyCommon(C, CE); in evalStdCopyBackward()
1971 const CallExpr *CE) const { in evalStdCopyCommon()
1972 if (CE->getNumArgs() < 3) in evalStdCopyCommon()
1985 const Expr *Dst = CE->getArg(2); in evalStdCopyCommon()
1992 SVal ResultVal = SVB.conjureSymbolVal(nullptr, CE, LCtx, C.blockCount()); in evalStdCopyCommon()
1993 State = State->BindExpr(CE, LCtx, ResultVal); in evalStdCopyCommon()
2015 bool CStringChecker::evalCall(const CallExpr *CE, CheckerContext &C) const { in evalCall() argument
2016 const FunctionDecl *FDecl = C.getCalleeDecl(CE); in evalCall()
2069 (this->*evalFunction)(C, CE); in evalCall()