clang
6.0.0
|
#include "RangedConstraintManager.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/APSIntType.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/ImmutableSet.h"
#include "llvm/Support/raw_ostream.h"
Go to the source code of this file.
Functions | |
REGISTER_TRAIT_WITH_PROGRAMSTATE (ConstraintRange, CLANG_ENTO_PROGRAMSTATE_MAP(SymbolRef, RangeSet)) namespace | |
static RangeSet | assumeNonZero (BasicValueFactory &BV, RangeSet::Factory &F, SymbolRef Sym, RangeSet Domain) |
Return a range set subtracting zero from Domain . More... | |
static RangeSet | applyBitwiseConstraints (BasicValueFactory &BV, RangeSet::Factory &F, RangeSet Input, const SymIntExpr *SIE) |
Apply implicit constraints for bitwise OR- and AND-. More... | |
|
static |
Apply implicit constraints for bitwise OR- and AND-.
For unsigned types, bitwise OR with a constant always returns a value greater-or-equal than the constant, and bitwise AND returns a value less-or-equal then the constant.
Pattern matches the expression Sym
against those rule, and applies the required constraints. Input
Previously established expression range set
Definition at line 485 of file RangeConstraintManager.cpp.
|
static |
Return a range set subtracting zero from Domain
.
Definition at line 467 of file RangeConstraintManager.cpp.
References clang::ento::BasicValueFactory::getAPSIntType(), clang::ento::SymExpr::getType(), and clang::ento::APSIntType::getZeroValue().
REGISTER_TRAIT_WITH_PROGRAMSTATE | ( | ConstraintRange | , |
CLANG_ENTO_PROGRAMSTATE_MAP(SymbolRef, RangeSet) | |||
) |
Definition at line 280 of file RangeConstraintManager.cpp.