Make sure to calculate value-dependence correctly when deal with ICEs.  
(Actually, this isn't precisely correct, but it doesn't make 
sense to query whether an expression that isn't an ICE is 
value-dependent anyway.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73179 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaTemplate/instantiate-declref-ice.cpp b/test/SemaTemplate/instantiate-declref-ice.cpp
new file mode 100644
index 0000000..21ee872
--- /dev/null
+++ b/test/SemaTemplate/instantiate-declref-ice.cpp
@@ -0,0 +1,7 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+
+template<int i> struct x {
+  static const int j = i;
+  x<j>* y;
+};
+