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 | 63a38a1b9432da0907f6d5345b59b5e1dad357bb (patch) | |
| tree | f5e878957cf98ae4bb21fd1473a3dd632f48d08e /clang/lib | |
| parent | 4a57ec86bb8d6a4064887d1f7fc740c91c68416b (diff) | |
| download | bcm5719-llvm-63a38a1b9432da0907f6d5345b59b5e1dad357bb.tar.gz bcm5719-llvm-63a38a1b9432da0907f6d5345b59b5e1dad357bb.zip | |
Instead of using operator bool() for testing if a BindingKey is valid, use an explicit isValid() method.
llvm-svn: 111181
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Checker/RegionStore.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Checker/RegionStore.cpp b/clang/lib/Checker/RegionStore.cpp index 1c74c3f3a31..7dd503c0f56 100644 --- a/clang/lib/Checker/RegionStore.cpp +++ b/clang/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); } |

