[cfe-commits] r111181 - /cfe/trunk/lib/Checker/RegionStore.cpp
Jordy Rose
jediknil at belkadan.com
Mon Aug 16 13:53:02 PDT 2010
Author: jrose
Date: Mon Aug 16 15:53:01 2010
New Revision: 111181
URL: http://llvm.org/viewvc/llvm-project?rev=111181&view=rev
Log:
Instead of using operator bool() for testing if a BindingKey is valid, use an explicit isValid() method.
Modified:
cfe/trunk/lib/Checker/RegionStore.cpp
Modified: cfe/trunk/lib/Checker/RegionStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/RegionStore.cpp?rev=111181&r1=111180&r2=111181&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/RegionStore.cpp (original)
+++ cfe/trunk/lib/Checker/RegionStore.cpp Mon Aug 16 15:53:01 2010
@@ -73,7 +73,7 @@
Offset == X.Offset;
}
- operator bool() const {
+ bool isValid() const {
return getRegion() != NULL;
}
};
@@ -1618,7 +1618,7 @@
}
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 @@
}
const SVal *RegionStoreManager::Lookup(RegionBindings B, BindingKey K) {
- if (!K)
+ if (!K.isValid())
return NULL;
return B.lookup(K);
}
@@ -1641,7 +1641,7 @@
}
RegionBindings RegionStoreManager::Remove(RegionBindings B, BindingKey K) {
- if (!K)
+ if (!K.isValid())
return B;
return RBFactory.Remove(B, K);
}
More information about the cfe-commits
mailing list