Fixed logic error in BasicConstraintManager pointed out by Zhongxing Xu.

For checking if a symbol >= value, we need to check if symbol == value || symbol
> value. When checking symbol > value and we know that symbol != value, the path
is infeasible only if value == maximum integer.

For checking if a symbol <= value, we need to check if symbol == value || symbol
< value. When checking symbol < value and we know that symbol != value, the path
is infeasible only if value == minimum integer.

Updated test case exercising this logic: we only prune paths if the values are
unsigned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56354 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Analysis/null-deref-ps.c b/test/Analysis/null-deref-ps.c
index 0f86acd..1fdcd06 100644
--- a/test/Analysis/null-deref-ps.c
+++ b/test/Analysis/null-deref-ps.c
@@ -91,21 +91,21 @@
 
 int* qux();
 
-int f9(int len) {
+int f9(unsigned len) {
   assert (len != 0);
   int *p = 0;
 
-  for (int i = 0; i < len; ++i)
+  for (unsigned i = 0; i < len; ++i)
    p = qux(i);
 
   return *p++; // no-warning
 }
 
-int f9b(int len) {
+int f9b(unsigned len) {
   assert (len > 0);  // note use of '>'
   int *p = 0;
 
-  for (int i = 0; i < len; ++i)
+  for (unsigned i = 0; i < len; ++i)
    p = qux(i);
 
   return *p++; // no-warning