Ted Kremenek | 2798e17 | 2008-04-16 18:39:25 +0000 | [diff] [blame] | 1 | //== GRTransferFuncs.cpp - Path-Sens. Transfer Functions Interface -*- C++ -*--= |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file defines GRTransferFuncs, which provides a base-class that |
| 11 | // defines an interface for transfer functions used by GRExprEngine. |
| 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
| 15 | #include "clang/Analysis/PathSensitive/GRTransferFuncs.h" |
Ted Kremenek | 1392261 | 2008-04-16 20:40:59 +0000 | [diff] [blame] | 16 | #include "clang/Analysis/PathSensitive/GRExprEngine.h" |
Ted Kremenek | 2798e17 | 2008-04-16 18:39:25 +0000 | [diff] [blame] | 17 | |
| 18 | using namespace clang; |
| 19 | |
Ted Kremenek | 4adc81e | 2008-08-13 04:27:00 +0000 | [diff] [blame] | 20 | void GRTransferFuncs::EvalBinOpNN(GRStateSet& OStates, |
Ted Kremenek | e04a5cb | 2008-11-15 00:20:05 +0000 | [diff] [blame] | 21 | GRExprEngine& Eng, |
Ted Kremenek | 4adc81e | 2008-08-13 04:27:00 +0000 | [diff] [blame] | 22 | const GRState *St, Expr* Ex, |
Ted Kremenek | df7533b | 2008-07-17 21:27:31 +0000 | [diff] [blame] | 23 | BinaryOperator::Opcode Op, |
Ted Kremenek | e0e4ebf | 2009-03-26 03:35:11 +0000 | [diff] [blame] | 24 | NonLoc L, NonLoc R, QualType T) { |
Ted Kremenek | df7533b | 2008-07-17 21:27:31 +0000 | [diff] [blame] | 25 | |
Ted Kremenek | e0e4ebf | 2009-03-26 03:35:11 +0000 | [diff] [blame] | 26 | OStates.Add(Eng.getStateManager().BindExpr(St, Ex, |
| 27 | DetermEvalBinOpNN(Eng, Op, L, R, T))); |
Ted Kremenek | df7533b | 2008-07-17 21:27:31 +0000 | [diff] [blame] | 28 | } |