1 //===----------------------------------------------------------------------===//
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 // Catching an exception thrown as nullptr was not properly handled before
10 // 2f984cab4fa7, which landed in macOS 10.13
11 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}}
14 // UNSUPPORTED: no-exceptions
55 template <class Catch
>
56 void catch_nullptr_test() {
70 // catch naked nullptrs
74 catch_nullptr_test
<int*>();
75 catch_nullptr_test
<int**>();
76 catch_nullptr_test
<int A::*>();
77 catch_nullptr_test
<const int A::*>();
78 catch_nullptr_test
<int A::**>();