• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===----------------------------------------------------------------------===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8 
9 // REQUIRES: no-exceptions
10 
11 #include <cxxabi.h>
12 #include <exception>
13 #include <cassert>
14 
15 // namespace __cxxabiv1 {
16 //      void *__cxa_current_primary_exception() throw();
17 //      extern bool          __cxa_uncaught_exception () throw();
18 //      extern unsigned int  __cxa_uncaught_exceptions() throw();
19 // }
20 
main()21 int main ()
22 {
23     // Trivially
24     assert(nullptr == __cxxabiv1::__cxa_current_primary_exception());
25     assert(!__cxxabiv1::__cxa_uncaught_exception());
26     assert(0 == __cxxabiv1::__cxa_uncaught_exceptions());
27     return 0;
28 }
29