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
diff --git a/tools/test.py b/tools/test.py
index 40a05d8..9f2b653 100755
--- a/tools/test.py
+++ b/tools/test.py
@@ -359,20 +359,10 @@
if IsPrecommitRun(args):
# Maximize the coverage for precommit testing.
- # TODO: Merge this ListCombinations call with the next one once
- # negative_testing is fixed on master for c++11.
- list_options += ListCombinations(
- compiler = args.compiler,
- negative_testing = 'off',
- std = 'c++11',
- mode = 'debug',
- target = 'a64,a32,t32')
-
- # Debug c++98 build with negative testing and all targets enabled.
+ # Debug builds with negative testing and all targets enabled.
list_options += ListCombinations(
compiler = args.compiler,
negative_testing = 'on',
- std = 'c++98',
mode = 'debug',
target = 'a64,a32,t32')