Add an additional test for dynamic_cast.

llvm-svn: 184454
This commit is contained in:
Eli Friedman 2013-06-20 18:53:38 +00:00
parent 447f729091
commit 97b5f2fafc

View File

@ -37,6 +37,8 @@ void basic_bad()
(void)dynamic_cast<Incomplete*>((A*)0); // expected-error {{'Incomplete' is an incomplete type}}
// incomplete -> ptr
(void)dynamic_cast<A*>((Incomplete*)0); // expected-error {{'Incomplete' is an incomplete type}}
// rvalue -> lvalue
(void)dynamic_cast<A&>(A()); // expected-error {{dynamic_cast from rvalue to reference type 'A &'}}
}
void same()