Added null dereference test case looking for null dereferences involving MemberExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50072 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Analysis/null-deref-ps.c b/test/Analysis/null-deref-ps.c
index c73a038..4ce4f8b 100644
--- a/test/Analysis/null-deref-ps.c
+++ b/test/Analysis/null-deref-ps.c
@@ -4,3 +4,15 @@
   if (p) *p = 1;
   else *p = 0; // expected-warning{{ereference}}
 }
+
+struct foo_struct {
+  int x;
+};
+
+int f2(struct foo_struct* p) {
+  
+  if (p)
+    p->x = 1;
+    
+  return p->x++;
+}