clang  13.0.0git
ArrayBoundCheckerV2.cpp File Reference
#include "Taint.h"
#include "clang/AST/CharUnits.h"
#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
#include "clang/StaticAnalyzer/Core/BugReporter/BugType.h"
#include "clang/StaticAnalyzer/Core/Checker.h"
#include "clang/StaticAnalyzer/Core/CheckerManager.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/APSIntType.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/DynamicExtent.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/raw_ostream.h"
Include dependency graph for ArrayBoundCheckerV2.cpp:

Go to the source code of this file.


static SVal computeExtentBegin (SValBuilder &svalBuilder, const MemRegion *region)
static std::pair< NonLoc, nonloc::ConcreteInt > getSimplifiedOffsets (NonLoc offset, nonloc::ConcreteInt extent, SValBuilder &svalBuilder)
static SVal getValue (SVal val, SValBuilder &svalBuilder)
static SVal scaleValue (ProgramStateRef state, NonLoc baseVal, CharUnits scaling, SValBuilder &sb)
static SVal addValue (ProgramStateRef state, SVal x, SVal y, SValBuilder &svalBuilder)

Function Documentation

◆ addValue()

static SVal addValue ( ProgramStateRef  state,
SVal  x,
SVal  y,
SValBuilder &  svalBuilder 

Definition at line 293 of file ArrayBoundCheckerV2.cpp.

References state, and x.

◆ computeExtentBegin()

static SVal computeExtentBegin ( SValBuilder &  svalBuilder,
const MemRegion *  region 

Definition at line 71 of file ArrayBoundCheckerV2.cpp.

◆ getSimplifiedOffsets()

static std::pair<NonLoc, nonloc::ConcreteInt> getSimplifiedOffsets ( NonLoc  offset,
nonloc::ConcreteInt  extent,
SValBuilder &  svalBuilder 

Definition at line 85 of file ArrayBoundCheckerV2.cpp.

◆ getValue()

static SVal getValue ( SVal  val,
SValBuilder &  svalBuilder 

◆ scaleValue()

static SVal scaleValue ( ProgramStateRef  state,
NonLoc  baseVal,
CharUnits  scaling,
SValBuilder &  sb 

Definition at line 283 of file ArrayBoundCheckerV2.cpp.

References clang::CharUnits::getQuantity(), and state.