Add comment for SelectionDAGBuilder::SL field.
[llvm-project.git] / libcxxabi / test / catch_array_01.pass.cpp
blobf8bd4b1ae18b83f8f9a18a8aaf43ed853546f107
1 //===---------------------- catch_array_01.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 // Can you have a catch clause of array type that catches anything?
11 // GCC incorrectly allows array types to be caught by reference.
12 // See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69372
13 // XFAIL: gcc
14 // UNSUPPORTED: no-exceptions
16 #include <cassert>
18 int main()
20 typedef char Array[4];
21 Array a = {'H', 'i', '!', 0};
22 try
24 throw a; // converts to char*
25 assert(false);
27 catch (Array& b) // can't catch char*
29 assert(false);
31 catch (...)