clang  9.0.0svn
SimpleSValBuilder.cpp File Reference
#include "clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/APSIntType.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/SValVisitor.h"
Include dependency graph for SimpleSValBuilder.cpp:

Go to the source code of this file.


static bool isInRelation (BinaryOperator::Opcode Rel, SymbolRef Sym, llvm::APSInt Bound, ProgramStateRef State)
static bool isWithinConstantOverflowBounds (SymbolRef Sym, ProgramStateRef State)
static bool isWithinConstantOverflowBounds (llvm::APSInt I)
static std::pair< SymbolRef, llvm::APSInt > decomposeSymbol (SymbolRef Sym, BasicValueFactory &BV)
static NonLoc doRearrangeUnchecked (ProgramStateRef State, BinaryOperator::Opcode Op, SymbolRef LSym, llvm::APSInt LInt, SymbolRef RSym, llvm::APSInt RInt)
static bool shouldRearrange (ProgramStateRef State, BinaryOperator::Opcode Op, SymbolRef Sym, llvm::APSInt Int, QualType Ty)
static Optional< NonLoc > tryRearrange (ProgramStateRef State, BinaryOperator::Opcode Op, NonLoc Lhs, NonLoc Rhs, QualType ResultTy)
static SVal evalBinOpFieldRegionFieldRegion (const FieldRegion *LeftFR, const FieldRegion *RightFR, BinaryOperator::Opcode op, QualType resultTy, SimpleSValBuilder &SVB)

Function Documentation

◆ decomposeSymbol()

static std::pair<SymbolRef, llvm::APSInt> decomposeSymbol ( SymbolRef  Sym,
BasicValueFactory &  BV 

Definition at line 356 of file SimpleSValBuilder.cpp.

References clang::BinaryOperator::isAdditiveOp().

Referenced by tryRearrange().

◆ doRearrangeUnchecked()

static NonLoc doRearrangeUnchecked ( ProgramStateRef  State,
BinaryOperator::Opcode  Op,
SymbolRef  LSym,
llvm::APSInt  LInt,
SymbolRef  RSym,
llvm::APSInt  RInt 

◆ evalBinOpFieldRegionFieldRegion()

static SVal evalBinOpFieldRegionFieldRegion ( const FieldRegion *  LeftFR,
const FieldRegion *  RightFR,
BinaryOperator::Opcode  op,
QualType  resultTy,
SimpleSValBuilder &  SVB 

◆ isInRelation()

static bool isInRelation ( BinaryOperator::Opcode  Rel,
SymbolRef  Sym,
llvm::APSInt  Bound,
ProgramStateRef  State 

Definition at line 313 of file SimpleSValBuilder.cpp.

Referenced by isWithinConstantOverflowBounds().

◆ isWithinConstantOverflowBounds() [1/2]

static bool isWithinConstantOverflowBounds ( SymbolRef  Sym,
ProgramStateRef  State 

◆ isWithinConstantOverflowBounds() [2/2]

static bool isWithinConstantOverflowBounds ( llvm::APSInt  I)

Definition at line 346 of file SimpleSValBuilder.cpp.

◆ shouldRearrange()

static bool shouldRearrange ( ProgramStateRef  State,
BinaryOperator::Opcode  Op,
SymbolRef  Sym,
llvm::APSInt  Int,
QualType  Ty 

◆ tryRearrange()

static Optional<NonLoc> tryRearrange ( ProgramStateRef  State,
BinaryOperator::Opcode  Op,
NonLoc  Lhs,
NonLoc  Rhs,
QualType  ResultTy