1 //===------------------- uncaught_exceptions.pass.cpp ---------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: libcxxabi-no-exceptions
14 // namespace __cxxabiv1 {
15 // extern unsigned int __cxa_uncaught_exceptions() throw();
19 A(unsigned cnt
) : data_(cnt
) {}
20 ~A() { assert( data_
== __cxxabiv1::__cxa_uncaught_exceptions()); }
25 try { A
a(1); throw 3; assert(false); }