"llvm/lib/git@repo.hca.bsc.es:rferrer/llvm-epi-0.8.git" did not exist on "cb80e2527e2618bf610e50b1de7564bc288136e1"
Newer
Older
//== GRTransferFuncs.cpp - Path-Sens. Transfer Functions Interface -*- C++ -*--=
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines GRTransferFuncs, which provides a base-class that
// defines an interface for transfer functions used by GRExprEngine.
//
//===----------------------------------------------------------------------===//
#include "clang/Analysis/PathSensitive/GRTransferFuncs.h"
Ted Kremenek
committed
#include "clang/Analysis/PathSensitive/GRExprEngine.h"
using namespace clang;
void GRTransferFuncs::RegisterChecks(GRExprEngine& Eng) {}
Ted Kremenek
committed
void GRTransferFuncs::EvalStore(ExplodedNodeSet<GRState>& Dst,
Ted Kremenek
committed
GRExprEngine& Eng,
GRStmtNodeBuilder<GRState>& Builder,
Expr* E, ExplodedNode<GRState>* Pred,
Zhongxing Xu
committed
const GRState* St, SVal TargetLV, SVal Val) {
Ted Kremenek
committed
// This code basically matches the "safety-net" logic of GRExprEngine:
// bind Val to TargetLV, and create a new node. We replicate it here
// because subclasses of GRTransferFuncs may wish to call it.
assert (!TargetLV.isUndef());
if (TargetLV.isUnknown())
Builder.MakeNode(Dst, E, Pred, St);
else
Builder.MakeNode(Dst, E, Pred,
Ted Kremenek
committed
}
Ted Kremenek
committed
void GRTransferFuncs::EvalBinOpNN(GRStateSet& OStates,
GRStateManager& StateMgr,
const GRState *St, Expr* Ex,
Ted Kremenek
committed
BinaryOperator::Opcode Op,
Zhongxing Xu
committed
NonLoc L, NonLoc R) {
Ted Kremenek
committed
Zhongxing Xu
committed
OStates.Add(StateMgr.SetSVal(St, Ex, DetermEvalBinOpNN(StateMgr, Op, L, R)));