diff options
author | Jonathan Roelofs <jonathan@codesourcery.com> | 2015-01-21 19:05:37 +0000 |
---|---|---|
committer | Jonathan Roelofs <jonathan@codesourcery.com> | 2015-01-21 19:05:37 +0000 |
commit | c0b48088747387dd36c652afc37f854d5bba3c24 (patch) | |
tree | 5c0783510e3ca981653e737a027259cc8c806097 /test/catch_in_noexcept.pass.cpp | |
parent | d2a72c45bb125271df1e68aa66bdf6bc77a2ce96 (diff) |
Rename all of the tests in preparation for merging lit configs with libcxx
http://reviews.llvm.org/D7101
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@226691 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/catch_in_noexcept.pass.cpp')
-rw-r--r-- | test/catch_in_noexcept.pass.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/catch_in_noexcept.pass.cpp b/test/catch_in_noexcept.pass.cpp new file mode 100644 index 0000000..02fecda --- /dev/null +++ b/test/catch_in_noexcept.pass.cpp @@ -0,0 +1,34 @@ +//===---------------------- catch_in_noexcept.cpp--------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include <exception> +#include <stdlib.h> +#include <assert.h> + +struct A {}; + +// Despite being marked as noexcept, this function must have an EHT entry that +// is not 'cantunwind', so that the unwinder can correctly deal with the throw. +void f1() noexcept +{ + try { + A a; + throw a; + assert(false); + } catch (...) { + assert(true); + return; + } + assert(false); +} + +int main() +{ + f1(); +} |