Add checker for CWE-587: Assignment of a Fixed Address to a Pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86523 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/SVals.cpp b/lib/Analysis/SVals.cpp
index 688b7ff..e230d27 100644
--- a/lib/Analysis/SVals.cpp
+++ b/lib/Analysis/SVals.cpp
@@ -173,6 +173,10 @@
 // Useful predicates.
 //===----------------------------------------------------------------------===//
 
+bool SVal::isConstant() const {
+  return isa<nonloc::ConcreteInt>(this) || isa<loc::ConcreteInt>(this);
+}
+
 bool SVal::isZeroConstant() const {
   if (isa<loc::ConcreteInt>(*this))
     return cast<loc::ConcreteInt>(*this).getValue() == 0;