diff --git a/libcxxabi/test/cxa_bad_typeid.pass.cpp b/libcxxabi/test/cxa_bad_typeid.pass.cpp index d747ff29eabd..50185736ebd6 100644 --- a/libcxxabi/test/cxa_bad_typeid.pass.cpp +++ b/libcxxabi/test/cxa_bad_typeid.pass.cpp @@ -24,7 +24,7 @@ class Base { class Derived : public Base {}; std::string test_bad_typeid(Derived *p) { - typeid(*p).name(); + return typeid(*p).name(); } void my_terminate() { std::cout << "A" << std::endl; exit(0); }