2008-04-17 02:39:25 +08:00
|
|
|
//== 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"
|
2008-04-17 04:40:59 +08:00
|
|
|
#include "clang/Analysis/PathSensitive/GRExprEngine.h"
|
2008-04-17 02:39:25 +08:00
|
|
|
|
|
|
|
using namespace clang;
|
|
|
|
|
2008-08-13 12:27:00 +08:00
|
|
|
void GRTransferFuncs::EvalBinOpNN(GRStateSet& OStates,
|
2008-11-15 08:20:05 +08:00
|
|
|
GRExprEngine& Eng,
|
2008-08-13 12:27:00 +08:00
|
|
|
const GRState *St, Expr* Ex,
|
2008-07-18 05:27:31 +08:00
|
|
|
BinaryOperator::Opcode Op,
|
2008-10-17 13:57:07 +08:00
|
|
|
NonLoc L, NonLoc R) {
|
2008-07-18 05:27:31 +08:00
|
|
|
|
2008-11-15 08:20:05 +08:00
|
|
|
OStates.Add(Eng.getStateManager().BindExpr(St, Ex, DetermEvalBinOpNN(Eng, Op, L, R)));
|
2008-07-18 05:27:31 +08:00
|
|
|
}
|