Go to the source code of this file.
static std::optional< std::pair< const SubRegion *, NonLoc > > computeOffset (ProgramStateRef State, SValBuilder &SVB, SVal Location) For a given Location that can be represented as a symbolic expression Arr[Idx] (or perhaps Arr[Idx1][Idx2] etc.), return the parent memory block Arr and the distance of Location from the beginning of Arr (expressed in a NonLoc that specifies the number of CharUnits).Val1
and Val2
(in place) by Divisor
and return true if it can be performed (Divisor
is nonzero and there is no remainder).
For a given Location that can be represented as a symbolic expression Arr[Idx] (or perhaps Arr[Idx1][Idx2] etc.), return the parent memory block Arr and the distance of Location from the beginning of Arr (expressed in a NonLoc that specifies the number of CharUnits).
Returns nullopt when these cannot be determined.
Definition at line 172 of file ArrayBoundCheckerV2.cpp.
References clang::ento::SValBuilder::evalBinOpNN(), clang::ento::SValBuilder::getArrayIndexType(), clang::ento::MemRegion::getAs(), clang::ento::SVal::getAs(), clang::ento::SVal::getAsRegion(), clang::ento::SValBuilder::getContext(), clang::ento::ElementRegion::getElementType(), clang::ento::ElementRegion::getIndex(), clang::CharUnits::getQuantity(), clang::ento::SubRegion::getSuperRegion(), clang::ASTContext::getTypeSizeInChars(), clang::Type::isIncompleteType(), clang::ento::SValBuilder::makeArrayIndex(), clang::ento::SValBuilder::makeZeroArrayIndex(), and clang::T.
◆ getConcreteValue() [1/2] static std::optional< int64_t > getConcreteValue ( NonLoc SV ) static ◆ getConcreteValue() [2/2] static std::optional< int64_t > getConcreteValue ( std::optional< NonLoc > SV ) static ◆ getExceedsMsgs() ◆ getPrecedesMsgs() static Messages getPrecedesMsgs ( const SubRegion * Region, NonLoc Offset ) static ◆ getRegionName() static std::string getRegionName ( const SubRegion * Region ) static ◆ getSimplifiedOffsets() ◆ getTaintMsgs() static Messages getTaintMsgs ( const SubRegion * Region, const char * OffsetName, bool AlsoMentionUnderflow ) static ◆ isNegative() ◆ isUnsigned()Definition at line 278 of file ArrayBoundCheckerV2.cpp.
References clang::ento::SValBuilder::getContext(), clang::Value::getType(), clang::Type::isUnsignedIntegerType(), and clang::T.
Referenced by CheckC23ConstexprInitStringLiteral(), compareValueToThreshold(), clang::ento::BasicValueFactory::getIntValue(), clang::ento::BasicValueFactory::getValue(), clang::DependentBitIntType::isSigned(), clang::ento::SValBuilder::makeIntVal(), clang::ASTContext::mergeTypes(), clang::BitIntType::Profile(), clang::DependentBitIntType::Profile(), and clang::serialization::DataStreamBasicReader< Impl >::readAPSInt().
◆ tryDividePair() static bool tryDividePair ( std::optional< int64_t > & Val1, std::optional< int64_t > & Val2, int64_t Divisor ) staticTry to divide Val1
and Val2
(in place) by Divisor
and return true if it can be performed (Divisor
is nonzero and there is no remainder).
The values Val1
and Val2
may be nullopt and in that case the corresponding division is considered to be successful.
Definition at line 390 of file ArrayBoundCheckerV2.cpp.
Referenced by getExceedsMsgs().
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4