Clang] Fix expansion of response files in -Wp after integrated-cc1 change
[llvm-project.git] / libcxxabi / test / catch_in_noexcept.pass.cpp
blob94af4dfb3d7ec39b33bc020b2f9ae05573a9aab4
1 //===---------------------- catch_in_noexcept.cpp--------------------------===//
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 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: c++98, c++03, libcxxabi-no-exceptions
11 #include <exception>
12 #include <stdlib.h>
13 #include <assert.h>
15 struct A {};
17 // Despite being marked as noexcept, this function must have an EHT entry that
18 // is not 'cantunwind', so that the unwinder can correctly deal with the throw.
19 void f1() noexcept
21 try {
22 A a;
23 throw a;
24 assert(false);
25 } catch (...) {
26 assert(true);
27 return;
29 assert(false);
32 int main()
34 f1();