reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

tools/clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp
 1548   SVal DstVal = state->getSVal(Dst, LCtx);
 1550   state = checkNonNull(C, state, Dst, DstVal, 1);
 1550   state = checkNonNull(C, state, Dst, DstVal, 1);
 1551   if (!state)
 1556   SVal srcVal = state->getSVal(srcExpr, LCtx);
 1557   state = checkNonNull(C, state, srcExpr, srcVal, 2);
 1557   state = checkNonNull(C, state, srcExpr, srcVal, 2);
 1558   if (!state)
 1562   SVal strLength = getCStringLength(C, state, srcExpr, srcVal);
 1579   state = CheckOverlap(C, state, isBounded ? CE->getArg(2) : CE->getArg(1), Dst, srcExpr);
 1579   state = CheckOverlap(C, state, isBounded ? CE->getArg(2) : CE->getArg(1), Dst, srcExpr);
 1581   if (!state)
 1588     SVal lenVal = state->getSVal(lenExpr, LCtx);
 1604       std::tie(stateSourceTooLong, stateSourceNotTooLong) = state->assume(
 1605           svalBuilder.evalBinOpNN(state, BO_GE, *strLengthNL, *lenValNL, cmpTy)
 1611         state = stateSourceTooLong;
 1616         state = stateSourceNotTooLong;
 1629         SVal dstStrLength = getCStringLength(C, state, Dst, DstVal);
 1634           maxLastElementIndex = svalBuilder.evalBinOpNN(state, BO_Add,
 1652           assumeZero(C, state, *lenValNL, sizeTy);
 1669         maxLastElementIndex = svalBuilder.evalBinOpNN(state, BO_Sub, *lenValNL,
 1683       amountCopied = getCStringLength(C, state, lenExpr, srcVal, true);
 1689           SVal copiedLessThanBound = svalBuilder.evalBinOpNN(state, BO_LE,
 1693           state = state->assume(
 1693           state = state->assume(
 1695           if (!state)
 1701           SVal copiedLessThanSrc = svalBuilder.evalBinOpNN(state, BO_LE,
 1705           state = state->assume(
 1705           state = state->assume(
 1707           if (!state)
 1719   assert(state);
 1732     SVal dstStrLength = getCStringLength(C, state, Dst, DstVal);
 1742       state = checkAdditionOverflow(C, state, *srcStrLengthNL, *dstStrLengthNL);
 1742       state = checkAdditionOverflow(C, state, *srcStrLengthNL, *dstStrLengthNL);
 1743       if (!state)
 1746       finalStrLength = svalBuilder.evalBinOpNN(state, BO_Add, *srcStrLengthNL,
 1755       finalStrLength = getCStringLength(C, state, CE, DstVal, true);
 1761           SVal sourceInResult = svalBuilder.evalBinOpNN(state, BO_GE,
 1765           state = state->assume(sourceInResult.castAs<DefinedOrUnknownSVal>(),
 1765           state = state->assume(sourceInResult.castAs<DefinedOrUnknownSVal>(),
 1767           if (!state)
 1773           SVal destInResult = svalBuilder.evalBinOpNN(state, BO_GE,
 1777           state =
 1778               state->assume(destInResult.castAs<DefinedOrUnknownSVal>(), true);
 1779           if (!state)
 1801   assert(state);
 1813         SVal maxLastElement = svalBuilder.evalBinOpLN(state, BO_Add, *dstRegVal,
 1815         state = CheckLocation(C, state, CE->getArg(2), maxLastElement,
 1815         state = CheckLocation(C, state, CE->getArg(2), maxLastElement,
 1817         if (!state)
 1824       SVal lastElement = svalBuilder.evalBinOpLN(state, BO_Add, *dstRegVal,
 1831         state = CheckLocation(C, state, Dst, lastElement, warningMsg);
 1831         state = CheckLocation(C, state, Dst, lastElement, warningMsg);
 1832         if (!state)
 1848     state = InvalidateBuffer(C, state, Dst, *dstRegVal,
 1848     state = InvalidateBuffer(C, state, Dst, *dstRegVal,
 1853     state = InvalidateBuffer(C, state, srcExpr, srcVal, /*IsSourceBuffer*/true,
 1853     state = InvalidateBuffer(C, state, srcExpr, srcVal, /*IsSourceBuffer*/true,
 1865     state = setCStringLength(state, dstRegVal->getRegion(), finalStrLength);
 1865     state = setCStringLength(state, dstRegVal->getRegion(), finalStrLength);
 1868   assert(state);
 1878   state = state->BindExpr(CE, LCtx, Result);
 1878   state = state->BindExpr(CE, LCtx, Result);
 1879   C.addTransition(state);