Mercurial > hg > CbC > CbC_llvm
diff libcxxabi/test/cxa_bad_cast.pass.cpp @ 221:79ff65ed7e25
LLVM12 Original
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 15 Jun 2021 19:15:29 +0900 |
parents | 1d019706d866 |
children | c4bab56944e8 |
line wrap: on
line diff
--- a/libcxxabi/test/cxa_bad_cast.pass.cpp Tue Jun 15 19:13:43 2021 +0900 +++ b/libcxxabi/test/cxa_bad_cast.pass.cpp Tue Jun 15 19:15:29 2021 +0900 @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -// UNSUPPORTED: c++98, c++03 +// UNSUPPORTED: c++03 #include <cxxabi.h> #include <cassert> @@ -14,6 +14,8 @@ #include <exception> #include <typeinfo> +#include "test_macros.h" + class Base { virtual void foo() {}; }; @@ -31,17 +33,17 @@ int main () { // swap-out the terminate handler - void (*default_handler)() = std::get_terminate(); + void (*default_handler)() = std::get_terminate(); std::set_terminate(my_terminate); -#ifndef LIBCXXABI_HAS_NO_EXCEPTIONS +#ifndef TEST_HAS_NO_EXCEPTIONS try { #endif Derived &d = test_bad_cast(gB); assert(false); ((void)d); -#ifndef LIBCXXABI_HAS_NO_EXCEPTIONS - } catch (std::bad_cast) { +#ifndef TEST_HAS_NO_EXCEPTIONS + } catch (std::bad_cast const&) { // success return 0; } catch (...) {