clang
8.0.0
|
#include "clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h"
Static Public Member Functions | |
static SMTSortRef | mkSort (SMTSolverRef &Solver, const QualType &Ty, unsigned BitWidth) |
static SMTExprRef | fromUnOp (SMTSolverRef &Solver, const UnaryOperator::Opcode Op, const SMTExprRef &Exp) |
Constructs an SMTExprRef from an unary operator. More... | |
static SMTExprRef | fromFloatUnOp (SMTSolverRef &Solver, const UnaryOperator::Opcode Op, const SMTExprRef &Exp) |
Constructs an SMTExprRef from a floating-point unary operator. More... | |
static SMTExprRef | fromNBinOp (SMTSolverRef &Solver, const BinaryOperator::Opcode Op, const std::vector< SMTExprRef > &ASTs) |
Construct an SMTExprRef from a n-ary binary operator. More... | |
static SMTExprRef | fromBinOp (SMTSolverRef &Solver, const SMTExprRef &LHS, const BinaryOperator::Opcode Op, const SMTExprRef &RHS, bool isSigned) |
Construct an SMTExprRef from a binary operator. More... | |
static SMTExprRef | fromFloatSpecialBinOp (SMTSolverRef &Solver, const SMTExprRef &LHS, const BinaryOperator::Opcode Op, const llvm::APFloat::fltCategory &RHS) |
Construct an SMTExprRef from a special floating-point binary operator. More... | |
static SMTExprRef | fromFloatBinOp (SMTSolverRef &Solver, const SMTExprRef &LHS, const BinaryOperator::Opcode Op, const SMTExprRef &RHS) |
Construct an SMTExprRef from a floating-point binary operator. More... | |
static SMTExprRef | fromCast (SMTSolverRef &Solver, const SMTExprRef &Exp, QualType ToTy, uint64_t ToBitWidth, QualType FromTy, uint64_t FromBitWidth) |
Construct an SMTExprRef from a QualType FromTy to a QualType ToTy, and their bit widths. More... | |
static llvm::APSInt | castAPSInt (SMTSolverRef &Solver, const llvm::APSInt &V, QualType ToTy, uint64_t ToWidth, QualType FromTy, uint64_t FromWidth) |
static SMTExprRef | fromData (SMTSolverRef &Solver, const SymbolID ID, const QualType &Ty, uint64_t BitWidth) |
Construct an SMTExprRef from a SymbolData. More... | |
static SMTExprRef | getCastExpr (SMTSolverRef &Solver, ASTContext &Ctx, const SMTExprRef &Exp, QualType FromTy, QualType ToTy) |
static SMTExprRef | getBinExpr (SMTSolverRef &Solver, ASTContext &Ctx, const SMTExprRef &LHS, QualType LTy, BinaryOperator::Opcode Op, const SMTExprRef &RHS, QualType RTy, QualType *RetTy) |
static SMTExprRef | getSymBinExpr (SMTSolverRef &Solver, ASTContext &Ctx, const BinarySymExpr *BSE, bool *hasComparison, QualType *RetTy) |
static SMTExprRef | getSymExpr (SMTSolverRef &Solver, ASTContext &Ctx, SymbolRef Sym, QualType *RetTy, bool *hasComparison) |
static SMTExprRef | getExpr (SMTSolverRef &Solver, ASTContext &Ctx, SymbolRef Sym, QualType *RetTy=nullptr, bool *hasComparison=nullptr) |
static SMTExprRef | getZeroExpr (SMTSolverRef &Solver, ASTContext &Ctx, const SMTExprRef &Exp, QualType Ty, bool Assumption) |
static SMTExprRef | getRangeExpr (SMTSolverRef &Solver, ASTContext &Ctx, SymbolRef Sym, const llvm::APSInt &From, const llvm::APSInt &To, bool InRange) |
static QualType | getAPSIntType (ASTContext &Ctx, const llvm::APSInt &Int) |
static std::pair< llvm::APSInt, QualType > | fixAPSInt (ASTContext &Ctx, const llvm::APSInt &Int) |
static void | doTypeConversion (SMTSolverRef &Solver, ASTContext &Ctx, SMTExprRef &LHS, SMTExprRef &RHS, QualType <y, QualType &RTy) |
template<typename T , T(*)(SMTSolverRef &Solver, const T &, QualType, uint64_t, QualType, uint64_t) doCast> | |
static void | doIntTypeConversion (SMTSolverRef &Solver, ASTContext &Ctx, T &LHS, QualType <y, T &RHS, QualType &RTy) |
template<typename T , T(*)(SMTSolverRef &Solver, const T &, QualType, uint64_t, QualType, uint64_t) doCast> | |
static void | doFloatTypeConversion (SMTSolverRef &Solver, ASTContext &Ctx, T &LHS, QualType <y, T &RHS, QualType &RTy) |
|
inlinestatic |
Definition at line 310 of file SMTConv.h.
References clang::ento::APSIntType::convert(), and clang::Type::isSignedIntegerOrEnumerationType().
|
inlinestatic |
Definition at line 714 of file SMTConv.h.
References clang::ASTContext::getFloatingTypeOrder(), clang::ASTContext::getTypeSize(), and clang::Type::isRealFloatingType().
|
inlinestatic |
Definition at line 630 of file SMTConv.h.
References clang::ASTContext::getCorrespondingUnsignedType(), clang::ASTContext::getIntegerTypeOrder(), clang::ASTContext::getPromotedIntegerType(), clang::ASTContext::getTypeSize(), clang::QualType::isNull(), clang::Type::isPromotableIntegerType(), and clang::Type::isSignedIntegerOrEnumerationType().
|
inlinestatic |
Definition at line 554 of file SMTConv.h.
References fromCast(), clang::QualType::getCanonicalType(), clang::ASTContext::getTypeSize(), clang::Type::isAnyPointerType(), clang::Type::isArithmeticType(), clang::Type::isBlockPointerType(), clang::Type::isIntegralOrEnumerationType(), clang::QualType::isNull(), clang::Type::isNullPtrType(), clang::Type::isObjCObjectPointerType(), clang::Type::isRealFloatingType(), clang::Type::isReferenceType(), and clang::Type::isVoidPointerType().
Referenced by getBinExpr().
|
inlinestatic |
Definition at line 537 of file SMTConv.h.
References clang::ASTContext::BoolTy, getAPSIntType(), clang::ASTContext::getTypeSize(), and clang::QualType::isNull().
Referenced by getRangeExpr(), getSymBinExpr(), and clang::ento::SMTConstraintManager< ConstraintSMT, SMTExprTy >::getSymVal().
|
inlinestatic |
Construct an SMTExprRef from a binary operator.
Definition at line 91 of file SMTConv.h.
References fromUnOp().
Referenced by fromFloatBinOp(), getBinExpr(), getRangeExpr(), clang::ento::SMTConstraintManager< ConstraintSMT, SMTExprTy >::getSymVal(), and getZeroExpr().
|
inlinestatic |
Construct an SMTExprRef from a QualType FromTy to a QualType ToTy, and their bit widths.
Definition at line 259 of file SMTConv.h.
References clang::Type::isAnyPointerType(), clang::Type::isBlockPointerType(), clang::Type::isBooleanType(), clang::Type::isIntegralOrEnumerationType(), clang::Type::isRealFloatingType(), clang::Type::isReferenceType(), and clang::Type::isSignedIntegerOrEnumerationType().
Referenced by doTypeConversion(), and getCastExpr().
|
inlinestatic |
Construct an SMTExprRef from a SymbolData.
Definition at line 319 of file SMTConv.h.
Referenced by getSymExpr(), and clang::ento::SMTConstraintManager< ConstraintSMT, SMTExprTy >::getSymVal().
|
inlinestatic |
Construct an SMTExprRef from a floating-point binary operator.
Definition at line 200 of file SMTConv.h.
References fromBinOp(), and fromFloatUnOp().
Referenced by getBinExpr(), and getZeroExpr().
|
inlinestatic |
Construct an SMTExprRef from a special floating-point binary operator.
Definition at line 168 of file SMTConv.h.
References fromFloatUnOp().
|
inlinestatic |
Constructs an SMTExprRef from a floating-point unary operator.
Definition at line 59 of file SMTConv.h.
References fromUnOp().
Referenced by fromFloatBinOp(), and fromFloatSpecialBinOp().
|
inlinestatic |
|
inlinestatic |
Constructs an SMTExprRef from an unary operator.
Definition at line 40 of file SMTConv.h.
Referenced by fromBinOp(), fromFloatUnOp(), and getZeroExpr().
|
inlinestatic |
Definition at line 530 of file SMTConv.h.
References clang::ASTContext::getIntTypeForBitwidth().
Referenced by fixAPSInt().
|
inlinestatic |
Definition at line 335 of file SMTConv.h.
References clang::ASTContext::BoolTy, doTypeConversion(), fromBinOp(), fromFloatBinOp(), clang::ASTContext::getPointerDiffType(), clang::Type::isAnyPointerType(), clang::BinaryOperator::isComparisonOp(), clang::BinaryOperator::isLogicalOp(), clang::Type::isRealFloatingType(), and clang::Type::isSignedIntegerOrEnumerationType().
Referenced by getRangeExpr(), and getSymBinExpr().
|
inlinestatic |
Definition at line 326 of file SMTConv.h.
References fromCast(), and clang::ASTContext::getTypeSize().
Referenced by getSymExpr().
|
inlinestatic |
Definition at line 450 of file SMTConv.h.
References getSymExpr().
Referenced by clang::ento::SMTConstraintManager< ConstraintSMT, SMTExprTy >::assumeSym(), clang::ento::SMTConstraintManager< ConstraintSMT, SMTExprTy >::checkNull(), and getRangeExpr().
|
inlinestatic |
Definition at line 491 of file SMTConv.h.
References fixAPSInt(), fromBinOp(), getBinExpr(), getExpr(), and clang::Type::isSignedIntegerOrEnumerationType().
Referenced by clang::ento::SMTConstraintManager< ConstraintSMT, SMTExprTy >::assumeSymInclusiveRange().
|
inlinestatic |
Definition at line 371 of file SMTConv.h.
References fixAPSInt(), getBinExpr(), clang::ento::BinarySymExpr::getOpcode(), and getSymExpr().
Referenced by getSymExpr().
|
inlinestatic |
Definition at line 408 of file SMTConv.h.
References fromData(), getCastExpr(), getSymBinExpr(), clang::ento::SymExpr::getType(), clang::ASTContext::getTypeSize(), and clang::BinaryOperator::isComparisonOp().
Referenced by getExpr(), and getSymBinExpr().
|
inlinestatic |
Definition at line 461 of file SMTConv.h.
References fromBinOp(), fromFloatBinOp(), fromUnOp(), clang::ASTContext::getFloatTypeSemantics(), clang::ASTContext::getTypeSize(), clang::Type::isAnyPointerType(), clang::Type::isBlockPointerType(), clang::Type::isBooleanType(), clang::Type::isIntegralOrEnumerationType(), clang::Type::isRealFloatingType(), clang::Type::isReferenceType(), and clang::Type::isSignedIntegerOrEnumerationType().
Referenced by clang::ento::SMTConstraintManager< ConstraintSMT, SMTExprTy >::assumeSym(), and clang::ento::SMTConstraintManager< ConstraintSMT, SMTExprTy >::checkNull().
|
inlinestatic |
Definition at line 28 of file SMTConv.h.
References clang::Type::isBooleanType(), and clang::Type::isRealFloatingType().