r184393 - One more cast test.
Eli Friedman
eli.friedman at gmail.com
Wed Jun 19 18:47:05 PDT 2013
Author: efriedma
Date: Wed Jun 19 20:47:05 2013
New Revision: 184393
URL: http://llvm.org/viewvc/llvm-project?rev=184393&view=rev
Log:
One more cast test.
Modified:
cfe/trunk/test/SemaTemplate/virtual-member-functions.cpp
Modified: cfe/trunk/test/SemaTemplate/virtual-member-functions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/virtual-member-functions.cpp?rev=184393&r1=184392&r2=184393&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/virtual-member-functions.cpp (original)
+++ cfe/trunk/test/SemaTemplate/virtual-member-functions.cpp Wed Jun 19 20:47:05 2013
@@ -84,3 +84,15 @@ namespace PR7114 {
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); }
+}
More information about the cfe-commits
mailing list