clang 24.0.0git
clang::ento::bounds Namespace Reference

Classes

struct  CheckFlags
class  CheckResult

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.
std::pair< ProgramStateRef, ProgramStateRefcompareValueToThreshold (ProgramStateRef State, SValBuilder &SVB, NonLoc Value, NonLoc Threshold, bool CheckEquality=false)

Function Documentation

◆ checkBounds()

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::CheckUnderflow, compareValueToThreshold(), clang::ento::SValBuilder::makeZeroArrayIndex(), and clang::ento::bounds::CheckFlags::OffsetObviouslyNonnegative.

◆ compareValueToThreshold()

std::pair< ProgramStateRef, ProgramStateRef > clang::ento::bounds::compareValueToThreshold ( ProgramStateRef State,
SValBuilder & SVB,
NonLoc Value,
NonLoc Threshold,
bool CheckEquality = false )