|
clang 24.0.0git
|
Classes | |
| struct | CheckFlags |
| class | CheckResult |
Enumerations | |
| enum class | Comparison { LT , LE , EQ } |
Functions | |
| CheckResult | checkBounds (ProgramStateRef State, SValBuilder &SVB, NonLoc Offset, std::optional< NonLoc > Extent, CheckFlags Flags) |
Checks the validity of accessing a memory region with extent Extent at offset Offset. | |
| BinaryOperator::Opcode | asOpcode (Comparison C) |
| std::pair< ProgramStateRef, ProgramStateRef > | compareValueToThreshold (ProgramStateRef State, SValBuilder &SVB, NonLoc Value, NonLoc Threshold, Comparison CmpKind) |
|
strong |
| Enumerator | |
|---|---|
| LT | |
| LE | |
| EQ | |
Definition at line 95 of file BoundsChecking.h.
|
inline |
Definition at line 97 of file BoundsChecking.h.
References clang::C, EQ, LE, and LT.
Referenced by compareValueToThreshold().
| bounds::CheckResult clang::ento::bounds::checkBounds | ( | ProgramStateRef | State, |
| SValBuilder & | SVB, | ||
| NonLoc | Offset, | ||
| std::optional< NonLoc > | Extent, | ||
| bounds::CheckFlags | Flags ) |
Checks the validity of accessing a memory region with extent Extent at offset Offset.
The Flags influence the semantics of the check.
Definition at line 128 of file BoundsChecking.cpp.
References clang::ento::bounds::CheckFlags::AlsoAcceptEquality, clang::ento::bounds::CheckFlags::CheckUnderflow, compareValueToThreshold(), LE, LT, clang::ento::SValBuilder::makeZeroArrayIndex(), and clang::ento::bounds::CheckFlags::OffsetObviouslyNonnegative.
| std::pair< ProgramStateRef, ProgramStateRef > clang::ento::bounds::compareValueToThreshold | ( | ProgramStateRef | State, |
| SValBuilder & | SVB, | ||
| NonLoc | Value, | ||
| NonLoc | Threshold, | ||
| Comparison | CmpKind ) |
Definition at line 78 of file BoundsChecking.cpp.
References asOpcode(), EQ, clang::ento::SValBuilder::evalBinOpNN(), clang::ento::SVal::getAs(), clang::ento::SValBuilder::getConditionType(), getSimplifiedOffsets(), isNegative(), and isUnsigned().
Referenced by checkBounds().