One more cast test.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184393 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaTemplate/virtual-member-functions.cpp b/test/SemaTemplate/virtual-member-functions.cpp
index 6892278..439d8f8 100644
--- a/test/SemaTemplate/virtual-member-functions.cpp
+++ b/test/SemaTemplate/virtual-member-functions.cpp
@@ -84,3 +84,15 @@
     xi.f();
   }
 }
+
+namespace DynamicCast {
+  struct Y {};
+  template<typename T> struct X : virtual Y {
+    virtual void foo() { T x; } // expected-error {{variable has incomplete type 'void'}}
+  };
+  template<typename T> struct X2 : virtual Y {
+    virtual void foo() { T x; }
+  };
+  Y* f(X<void>* x) { return dynamic_cast<Y*>(x); } // expected-note {{in instantiation of member function 'DynamicCast::X<void>::foo' requested here}}
+  Y* f2(X<void>* x) { return dynamic_cast<Y*>(x); }
+}