PR10837: Warn if a null pointer constant is formed by a zero integer constant
expression that is not a zero literal, in C. This is a different, and more
targeted, approach than that in r194540.

llvm-svn: 195303
diff --git a/clang/test/SemaTemplate/dependent-expr.cpp b/clang/test/SemaTemplate/dependent-expr.cpp
index 01ac42e..2c26ec5 100644
--- a/clang/test/SemaTemplate/dependent-expr.cpp
+++ b/clang/test/SemaTemplate/dependent-expr.cpp
@@ -79,3 +79,17 @@
     return ((void*)(((unsigned long)(x)|0x1ul)));
   }
 };
+
+// Regression test for crasher in r194540.
+namespace PR10837 {
+  typedef void t(int);
+  template<typename> struct A {
+    void f();
+    static t g;
+  };
+  t *p;
+  template<typename T> void A<T>::f() {
+    p = g;
+  }
+  template struct A<int>;
+}