"git@repo.hca.bsc.es:rferrer/llvm-epi-0.8.git" did not exist on "49bcd6ff857e0c3de813ab3731a0fcd79b306f48"
Newer
Older
// GRSimpleVals.h - Transfer functions for tracking simple values -*- 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 GRSimpleVals, a sub-class of GRTransferFuncs that
// provides transfer functions for performing simple value tracking with
// limited support for symbolics.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_ANALYSIS_GRSIMPLEVALS
#define LLVM_CLANG_ANALYSIS_GRSIMPLEVALS
#include "clang/Analysis/PathSensitive/GRTransferFuncs.h"
#include "clang/Analysis/PathSensitive/GRExprEngine.h"
namespace clang {
Ted Kremenek
committed
class PathDiagnostic;
class ASTContext;
class GRSimpleVals : public GRTransferFuncs {
Ted Kremenek
committed
protected:
virtual SVal DetermEvalBinOpNN(GRExprEngine& Eng,
Ted Kremenek
committed
BinaryOperator::Opcode Op,
Zhongxing Xu
committed
NonLoc L, NonLoc R);
Ted Kremenek
committed
public:
GRSimpleVals() {}
virtual ~GRSimpleVals() {}
Ted Kremenek
committed
// Casts.
Zhongxing Xu
committed
virtual SVal EvalCast(GRExprEngine& Engine, NonLoc V, QualType CastT);
virtual SVal EvalCast(GRExprEngine& Engine, Loc V, QualType CastT);
Ted Kremenek
committed
// Unary Operators.
Zhongxing Xu
committed
virtual SVal EvalMinus(GRExprEngine& Engine, UnaryOperator* U, NonLoc X);
Zhongxing Xu
committed
virtual SVal EvalComplement(GRExprEngine& Engine, NonLoc X);
// Binary Operators.
Zhongxing Xu
committed
virtual SVal EvalBinOp(GRExprEngine& Engine, BinaryOperator::Opcode Op,
Loc L, Loc R);
Ted Kremenek
committed
Ted Kremenek
committed
// Pointer arithmetic.
Zhongxing Xu
committed
virtual SVal EvalBinOp(GRExprEngine& Engine, BinaryOperator::Opcode Op,
Loc L, NonLoc R);
Ted Kremenek
committed
// Calls.
virtual void EvalCall(ExplodedNodeSet<GRState>& Dst,
GRExprEngine& Engine,
Zhongxing Xu
committed
CallExpr* CE, SVal L,
virtual void EvalObjCMessageExpr(ExplodedNodeSet<GRState>& Dst,
GRExprEngine& Engine,
ObjCMessageExpr* ME,
Ted Kremenek
committed
static void GeneratePathDiagnostic(PathDiagnostic& PD, ASTContext& Ctx,
Ted Kremenek
committed
Ted Kremenek
committed
protected:
Zhongxing Xu
committed
// Equality operators for Locs.
Zhongxing Xu
committed
SVal EvalEQ(GRExprEngine& Engine, Loc L, Loc R);
SVal EvalNE(GRExprEngine& Engine, Loc L, Loc R);
};
} // end clang namespace
#endif