blob: 1ed69688b8dee275026b58c4f9efd8285b398485 [file] [log] [blame]
Ted Kremenekd59cccc2008-02-14 18:28:23 +00001// GRSimpleVals.h - Transfer functions for tracking simple values -*- 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 files defines GRSimpleVals, a sub-class of GRTransferFuncs that
11// provides transfer functions for performing simple value tracking with
12// limited support for symbolics.
13//
14//===----------------------------------------------------------------------===//
15
16#ifndef LLVM_CLANG_ANALYSIS_GRSIMPLEVALS
17#define LLVM_CLANG_ANALYSIS_GRSIMPLEVALS
18
19#include "clang/Analysis/PathSensitive/GRTransferFuncs.h"
20
21namespace clang {
22
23class GRSimpleVals : public GRTransferFuncs {
24public:
25 GRSimpleVals() {}
26 virtual ~GRSimpleVals() {}
27
Ted Kremenekc3f261d2008-02-14 18:40:24 +000028 // Casts.
29
Ted Kremenekd59cccc2008-02-14 18:28:23 +000030 virtual RValue EvalCast(ValueManager& ValMgr, NonLValue V, Expr* CastExpr);
31 virtual RValue EvalCast(ValueManager& ValMgr, LValue V, Expr* CastExpr);
Ted Kremenekc3f261d2008-02-14 18:40:24 +000032
33 // Unary Operators.
34
35 virtual NonLValue EvalMinus(ValueManager& ValMgr, UnaryOperator* U,
36 NonLValue X);
37
38 virtual NonLValue EvalComplement(ValueManager& ValMgr, NonLValue X);
Ted Kremenek6cb0b542008-02-14 19:37:24 +000039
40 // Binary Operators.
41
42 virtual NonLValue EvalBinaryOp(ValueManager& ValMgr,
43 BinaryOperator::Opcode Op,
44 NonLValue LHS, NonLValue RHS);
45
46 // Equality operators for LValues.
47 virtual NonLValue EvalEQ(ValueManager& ValMgr, LValue LHS, LValue RHS);
48 virtual NonLValue EvalNE(ValueManager& ValMgr, LValue LHS, LValue RHS);
Ted Kremenekd59cccc2008-02-14 18:28:23 +000049};
50
51
52} // end clang namespace
53
54#endif