Instead of using operator bool() for testing if a BindingKey is valid, use an explicit isValid() method.
llvm-svn: 111181
diff --git a/clang/lib/Checker/RegionStore.cpp b/clang/lib/Checker/RegionStore.cpp
index 1c74c3f..7dd503c 100644
--- a/clang/lib/Checker/RegionStore.cpp
+++ b/clang/lib/Checker/RegionStore.cpp
@@ -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);
}