diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-04-22 21:10:18 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-04-22 21:10:18 +0000 |
commit | 0fe33bc94a822e315585e5cde1964d3c3b9052f9 (patch) | |
tree | 37a7aaad6e07752e567ddef1b23ca47b3ec7bbcb /include/clang/Analysis/PathSensitive/BasicValueFactory.h | |
parent | 9fdf9c6d3530bb85f3166e6460d841e2ff8e1a2c (diff) |
Added "nonlval::LValAsInteger" to represent abstract LVals casted to integers, allowing us to track lvals when they are casted back to pointers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50108 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Analysis/PathSensitive/BasicValueFactory.h')
-rw-r--r-- | include/clang/Analysis/PathSensitive/BasicValueFactory.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/clang/Analysis/PathSensitive/BasicValueFactory.h b/include/clang/Analysis/PathSensitive/BasicValueFactory.h index 351e326344..9462ed597d 100644 --- a/include/clang/Analysis/PathSensitive/BasicValueFactory.h +++ b/include/clang/Analysis/PathSensitive/BasicValueFactory.h @@ -27,22 +27,26 @@ namespace llvm { namespace clang { +class RVal; + class BasicValueFactory { typedef llvm::FoldingSet<llvm::FoldingSetNodeWrapper<llvm::APSInt> > APSIntSetTy; typedef llvm::FoldingSet<SymIntConstraint> SymIntCSetTy; + ASTContext& Ctx; llvm::BumpPtrAllocator& BPAlloc; APSIntSetTy APSIntSet; SymIntCSetTy SymIntCSet; + void* PersistentRVals; public: BasicValueFactory(ASTContext& ctx, llvm::BumpPtrAllocator& Alloc) - : Ctx(ctx), BPAlloc(Alloc) {} + : Ctx(ctx), BPAlloc(Alloc), PersistentRVals(0) {} ~BasicValueFactory(); @@ -66,6 +70,9 @@ public: const llvm::APSInt* EvaluateAPSInt(BinaryOperator::Opcode Op, const llvm::APSInt& V1, const llvm::APSInt& V2); + + const std::pair<RVal, unsigned>& + getPersistentSizedRVal(const RVal& V, unsigned Bits); }; } // end clang namespace |