diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-07-13 17:21:42 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-07-13 17:21:42 +0000 |
commit | 1928da94b55683957759d5c5ff4593a118773394 (patch) | |
tree | 48b44512b5db8ced345df4a1a56b5065cf2a14d9 /lib/Checker/SVals.cpp | |
parent | 53992adde3eda3ccf9da63bc7e45673f043de18f (diff) | |
download | FreeBSD-src-1928da94b55683957759d5c5ff4593a118773394.zip FreeBSD-src-1928da94b55683957759d5c5ff4593a118773394.tar.gz |
Update clang to r108243.
Diffstat (limited to 'lib/Checker/SVals.cpp')
-rw-r--r-- | lib/Checker/SVals.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/Checker/SVals.cpp b/lib/Checker/SVals.cpp index d756be7..7a99e86 100644 --- a/lib/Checker/SVals.cpp +++ b/lib/Checker/SVals.cpp @@ -200,15 +200,19 @@ bool SVal::isConstant() const { return isa<nonloc::ConcreteInt>(this) || isa<loc::ConcreteInt>(this); } -bool SVal::isZeroConstant() const { +bool SVal::isConstant(int I) const { if (isa<loc::ConcreteInt>(*this)) - return cast<loc::ConcreteInt>(*this).getValue() == 0; + return cast<loc::ConcreteInt>(*this).getValue() == I; else if (isa<nonloc::ConcreteInt>(*this)) - return cast<nonloc::ConcreteInt>(*this).getValue() == 0; + return cast<nonloc::ConcreteInt>(*this).getValue() == I; else return false; } +bool SVal::isZeroConstant() const { + return isConstant(0); +} + //===----------------------------------------------------------------------===// // Transfer function dispatch for Non-Locs. |