For internal consistency's sake, compute the value kind of a dependent cast
based on the known properties of the casted-to type.  Fixes a crash on spirit.

llvm-svn: 120180
diff --git a/clang/test/SemaTemplate/dependent-expr.cpp b/clang/test/SemaTemplate/dependent-expr.cpp
index e25afce..f3970d1d 100644
--- a/clang/test/SemaTemplate/dependent-expr.cpp
+++ b/clang/test/SemaTemplate/dependent-expr.cpp
@@ -45,3 +45,10 @@
   template<typename OT> int myMethod()
   { return 2 && sizeof(OT); }
 }
+
+namespace test4 {
+  template <typename T> T *addressof(T &v) {
+    return reinterpret_cast<T*>(
+             &const_cast<char&>(reinterpret_cast<const volatile char &>(v)));
+  }
+}