Merge a test into pointers-to-data-members.cpp and convert it to FileCheck.

llvm-svn: 95061
diff --git a/clang/test/CodeGenCXX/pointers-to-data-members.cpp b/clang/test/CodeGenCXX/pointers-to-data-members.cpp
index 567e3f3..c34bd5b 100644
--- a/clang/test/CodeGenCXX/pointers-to-data-members.cpp
+++ b/clang/test/CodeGenCXX/pointers-to-data-members.cpp
@@ -4,6 +4,38 @@
 struct B { int b; };
 struct C : B, A { };
 
+// Zero init.
+namespace ZeroInit {
+  // CHECK: @_ZN8ZeroInit1aE = global i64 -1
+  int A::* a;
+  
+  // CHECK: @_ZN8ZeroInit2aaE = global [2 x i64] [i64 -1, i64 -1]
+  int A::* aa[2];
+  
+  // CHECK: @_ZN8ZeroInit3aaaE = global [2 x [2 x i64]] {{\[}}[2 x i64] [i64 -1, i64 -1], [2 x i64] [i64 -1, i64 -1]]
+  int A::* aaa[2][2];
+  
+  // CHECK: @_ZN8ZeroInit1bE = global i64 -1,
+  int A::* b = 0;
+  
+  void f() {
+    // CHECK: icmp ne i64 {{.*}}, -1
+    if (a) { }
+
+    // CHECK: icmp ne i64 {{.*}}, -1
+    if (a != 0) { }
+    
+    // CHECK: icmp ne i64 -1, {{.*}}
+    if (0 != a) { }
+
+    // CHECK: icmp eq i64 {{.*}}, -1
+    if (a == 0) { }
+
+    // CHECK: icmp eq i64 -1, {{.*}}
+    if (0 == a) { }
+  }
+}
+
 // Casts.
 namespace Casts {