diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-06-26 00:15:05 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-06-26 00:15:05 +0000 |
commit | e74eaef9b550c002e59dfc57c0dd640a5f129e8e (patch) | |
tree | 7b5772638881d11f135daa5c5f5ef68b25557689 | |
parent | 1637be727f2a0434c1ed7aa385ea1c18328b0ccd (diff) |
Add missing header file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74233 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Analysis/PathSensitive/SValuator.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/include/clang/Analysis/PathSensitive/SValuator.h b/include/clang/Analysis/PathSensitive/SValuator.h new file mode 100644 index 0000000000..490c04e597 --- /dev/null +++ b/include/clang/Analysis/PathSensitive/SValuator.h @@ -0,0 +1,55 @@ +// SValuator.h - Construction of SVals from evaluating expressions -*- 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 SValuator, a class that defines the interface for +// "symbolical evaluators" which construct an SVal from an expression. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_ANALYSIS_SVALUATOR +#define LLVM_CLANG_ANALYSIS_SVALUATOR + +#include "clang/AST/Expr.h" +#include "clang/Analysis/PathSensitive/SVals.h" + +namespace clang { + +class GRState; +class ValueManager; + +class SValuator { +protected: + ValueManager &ValMgr; + +public: + SValuator(ValueManager &valMgr) : ValMgr(valMgr) {} + virtual ~SValuator() {} + + virtual SVal EvalCast(NonLoc val, QualType castTy) = 0; + + virtual SVal EvalCast(Loc val, QualType castTy) = 0; + + virtual SVal EvalMinus(NonLoc val) = 0; + + virtual SVal EvalComplement(NonLoc val) = 0; + + virtual SVal EvalBinOpNN(BinaryOperator::Opcode Op, NonLoc lhs, + NonLoc rhs, QualType resultTy) = 0; + + virtual SVal EvalBinOpLL(BinaryOperator::Opcode Op, Loc lhs, Loc rhs, + QualType resultTy) = 0; + + virtual SVal EvalBinOpLN(const GRState *state, BinaryOperator::Opcode Op, + Loc lhs, NonLoc rhs, QualType resultTy) = 0; +}; + +SValuator* CreateSimpleSValuator(ValueManager &valMgr); + +} // end clang namespace +#endif |