diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2013-09-24 23:21:41 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2013-09-24 23:21:41 +0000 |
commit | 3ce27103d9f95ade2a426d90d7639c4bf6fd96c3 (patch) | |
tree | 6bd22dbc563dfbf3ee8f921c272dfb7a8c61ffdf /clang/test/SemaCXX/no-rtti.cpp | |
parent | 1f5d8882f9616bfdddb15ac85e2d4f2086e45808 (diff) | |
download | bcm5719-llvm-3ce27103d9f95ade2a426d90d7639c4bf6fd96c3.tar.gz bcm5719-llvm-3ce27103d9f95ade2a426d90d7639c4bf6fd96c3.zip |
Allow dynamic_cast to void* even with -fno-rtti.
PR17346.
llvm-svn: 191340
Diffstat (limited to 'clang/test/SemaCXX/no-rtti.cpp')
-rw-r--r-- | clang/test/SemaCXX/no-rtti.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/no-rtti.cpp b/clang/test/SemaCXX/no-rtti.cpp index 3d6e109551d..a171b3cde2c 100644 --- a/clang/test/SemaCXX/no-rtti.cpp +++ b/clang/test/SemaCXX/no-rtti.cpp @@ -22,3 +22,8 @@ struct B : public A { bool isa_B(A *a) { return dynamic_cast<B *>(a) != 0; // expected-error {{cannot use dynamic_cast with -fno-rtti}} } + +void* getMostDerived(A* a) { + // This cast does not use RTTI. + return dynamic_cast<void *>(a); +} |