[X86] avx512-pmovxrm.ll - replace X32 checks with X86. NFC.
[llvm-project.git] / libcxxabi / test / catch_function_02.pass.cpp
blob460ab1a877dd36344b9064ca689d58b640e9f178
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 //===----------------------------------------------------------------------===//
9 // Can you have a catch clause of array type that catches anything?
10 // UNSUPPORTED: no-exceptions
12 #include <cassert>
14 void f() {}
16 int main(int, char**)
18 typedef void Function();
19 try
21 throw f; // converts to void (*)()
22 assert(false);
24 catch (Function b) // equivalent to void (*)()
27 catch (...)
29 assert(false);
32 return 0;