diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-04-11 00:11:10 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-04-11 00:11:10 +0000 |
commit | 1670e403c48f3af4fceff3f6773a0e1cfc6c4eb3 (patch) | |
tree | 3b1044513e874e7285fa3b8a874122286b97066b /include/clang/Analysis/PathSensitive/BasicValueFactory.h | |
parent | c2112181b96349eb595dc5e8b7073b81ecdec0db (diff) |
Implement analyzer support for OSCompareAndSwap. This required pushing "tagged"
ProgramPoints all the way through to GRCoreEngine.
NSString.m now fails with RegionStoreManager because of the void** cast.
Disabling use of region store for that test for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68845 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Analysis/PathSensitive/BasicValueFactory.h')
-rw-r--r-- | include/clang/Analysis/PathSensitive/BasicValueFactory.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/clang/Analysis/PathSensitive/BasicValueFactory.h b/include/clang/Analysis/PathSensitive/BasicValueFactory.h index 553f8a31bc..b694e9b299 100644 --- a/include/clang/Analysis/PathSensitive/BasicValueFactory.h +++ b/include/clang/Analysis/PathSensitive/BasicValueFactory.h @@ -126,8 +126,12 @@ public: return getValue(0, Ctx.getTypeSize(Ctx.VoidPtrTy), isUnsigned); } + inline const llvm::APSInt& getTruthValue(bool b, QualType T) { + return getValue(b ? 1 : 0, Ctx.getTypeSize(T), false); + } + inline const llvm::APSInt& getTruthValue(bool b) { - return getValue(b ? 1 : 0, Ctx.getTypeSize(Ctx.IntTy), false); + return getTruthValue(b, Ctx.IntTy); } const CompoundValData* getCompoundValData(QualType T, |