Cleanup in CStringChecker. Now properly bifurcates the state for zero/nonzero sizes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107935 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Analysis/bstring.c b/test/Analysis/bstring.c
index 59d6318..f4ddb0a 100644
--- a/test/Analysis/bstring.c
+++ b/test/Analysis/bstring.c
@@ -238,6 +238,14 @@
     (void)*(char*)0;   // no-warning
 }
 
+void memcmp6 (char *a, char *b, size_t n) {
+  int result = memcmp(a, b, n);
+  if (result != 0)
+    return;
+  if (n == 0)
+    (void)*(char*)0; // expected-warning{{null}}
+}
+
 //===----------------------------------------------------------------------===
 // bcopy()
 //===----------------------------------------------------------------------===