1 //===------------------------- catch_ptr_02.cpp ---------------------------===//
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 // UNSUPPORTED: libcxxabi-no-exceptions
13 // Clang emits warnings about exceptions of type 'Child' being caught by
14 // an earlier handler of type 'Base'. Congrats clang, you've just
15 // diagnosed the behavior under test.
16 #if defined(__clang__)
17 #pragma clang diagnostic ignored "-Wexceptions"
20 #if __cplusplus < 201103L
21 #define DISABLE_NULLPTR_TESTS
92 struct base1
{int x
;};
93 struct base2
{int x
;};
94 struct derived
: base1
, base2
{};
114 #if !defined(DISABLE_NULLPTR_TESTS)
121 assert (p
== nullptr);
138 assert ((unsigned long)p
== 12+sizeof(base1
));
148 struct vDerived
: virtual public vBase
{};
169 #if !defined(DISABLE_NULLPTR_TESTS)