Skip to content
Commit a5b3cefd authored by Pierre Langlois's avatar Pierre Langlois
Browse files

Allow throwing exceptions from destructors for testing.

If VIXL_NEGATIVE_TESTING is on, VIXL_ASSERT and VIXL_CHECK will throw
exceptions. However, when building with C++11, destructors are implicitly marked
as `noexcept` which means that throwing an exception from a destructor will
terminate the program.

Because of this we would fail to build with clang version 6 or higher because of
warnings.  And more imporantly, the AARCH32_DISASM_unbound_label negative test
would fail when built with C++11. We missed this since test.py only builds
negative tests with C++98 by default.

To fix this, we have to mark all desctructors that can throw as
`noexept(false)` using a macro.

Change-Id: Ia22105df3ffa462fbe24db37f63f1558b671cf7b
parent eee00de3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment