diff options
author | Jordy Rose <jediknil@belkadan.com> | 2010-08-16 20:53:01 +0000 |
---|---|---|
committer | Jordy Rose <jediknil@belkadan.com> | 2010-08-16 20:53:01 +0000 |
commit | d5addb48398241e1f63c114d860dfe30346258e8 (patch) | |
tree | b15a45f8434bd347991d686311077cc647f779d2 /lib/Checker/RegionStore.cpp | |
parent | 1802eebad8ebbd0b771b0776dbc53d2208af46d1 (diff) |
Instead of using operator bool() for testing if a BindingKey is valid, use an explicit isValid() method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111181 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/RegionStore.cpp')
-rw-r--r-- | lib/Checker/RegionStore.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Checker/RegionStore.cpp b/lib/Checker/RegionStore.cpp index 1c74c3f3a3..7dd503c0f5 100644 --- a/lib/Checker/RegionStore.cpp +++ b/lib/Checker/RegionStore.cpp @@ -73,7 +73,7 @@ public: Offset == X.Offset; } - operator bool() const { + bool isValid() const { return getRegion() != NULL; } }; @@ -1618,7 +1618,7 @@ BindingKey BindingKey::Make(const MemRegion *R, Kind k) { } RegionBindings RegionStoreManager::Add(RegionBindings B, BindingKey K, SVal V) { - if (!K) + if (!K.isValid()) return B; return RBFactory.Add(B, K, V); } @@ -1629,7 +1629,7 @@ RegionBindings RegionStoreManager::Add(RegionBindings B, const MemRegion *R, } const SVal *RegionStoreManager::Lookup(RegionBindings B, BindingKey K) { - if (!K) + if (!K.isValid()) return NULL; return B.lookup(K); } @@ -1641,7 +1641,7 @@ const SVal *RegionStoreManager::Lookup(RegionBindings B, } RegionBindings RegionStoreManager::Remove(RegionBindings B, BindingKey K) { - if (!K) + if (!K.isValid()) return B; return RBFactory.Remove(B, K); } |