clang 10.0.0git

Functions
ArrayBoundCheckerV2.cpp File Reference
`#include "Taint.h"`
`#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"`
`#include "clang/AST/CharUnits.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/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.

## Functions
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
| ) |  |
| static

Definition at line 293 of file ArrayBoundCheckerV2.cpp.

References clang::ASTContext::getTypeSizeInChars(), getValue(), clang::Type::isIncompleteType(), scaleValue(), and clang::CodeGen::state.

## ◆ computeExtentBegin()

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

Definition at line 70 of file ArrayBoundCheckerV2.cpp.

Referenced by getSimplifiedOffsets().

## ◆ getSimplifiedOffsets()

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

Definition at line 84 of file ArrayBoundCheckerV2.cpp.

References computeExtentBegin(), dump(), clang::ento::taint::isTainted(), and clang::CodeGen::state.

## ◆ getValue()

static SVal getValue | ( | SVal | val,
|  | SValBuilder & | svalBuilder
| ) |  |
| inline static

Definition at line 277 of file ArrayBoundCheckerV2.cpp.

Referenced by clang::ento::BasicValueFactory::Add1(), addValue(), clang::ento::SimpleConstraintManager::assume(), clang::ento::SimpleConstraintManager::assumeInclusiveRange(), clang::ento::nonloc::CompoundVal::begin(), clang::ento::mpi::MPIChecker::checkMissingWaits(), clang::ento::BasicValueFactory::Convert(), clang::ento::NonLoc::dumpToStream(), clang::ento::Loc::dumpToStream(), emitStoresForConstant(), clang::ento::nonloc::CompoundVal::end(), clang::ento::BasicValueFactory::evalAPSInt(), clang::ento::nonloc::ConcreteInt::evalBinOp(), clang::ento::loc::ConcreteInt::evalBinOp(), evalBinOpFieldRegionFieldRegion(), clang::ento::nonloc::ConcreteInt::evalComplement(), clang::ento::nonloc::ConcreteInt::evalMinus(), clang::tooling::OptionRequirement< OptionType >::evaluate(), clang::ento::BasicValueFactory::getContext(), clang::ento::BasicValueFactory::getIntValue(), clang::ento::BasicValueFactory::getIntWithPtrWidth(), clang::ento::BasicValueFactory::getMaxValue(), clang::ento::BasicValueFactory::getMinValue(), clang::threadSafety::getSourceLiteralString(), clang::ento::BasicValueFactory::getTruthValue(), clang::ento::BasicValueFactory::getValue(), clang::ento::BasicValueFactory::getZeroWithPtrWidth(), clang::ento::BasicValueFactory::getZeroWithTypeSize(), isAlwaysUninit(), clang::CodeGen::ReturnValueSlot::isNull(), nodeToCommandLine(), clang::ento::BasicValueFactory::Sub1(), tryRearrange(), and clang::ento::ExprEngine::VisitLogicalExpr().

## ◆ scaleValue()

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

Definition at line 283 of file ArrayBoundCheckerV2.cpp.

References clang::CharUnits::getQuantity().

Referenced by addValue().