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 // UNSUPPORTED: no-exceptions
11 // Compilers emit warnings about exceptions of type 'Child' being caught by
12 // an earlier handler of type 'Base'. Congrats, you've just diagnosed the
13 // behavior under test.
14 // ADDITIONAL_COMPILE_FLAGS: -Wno-exceptions
16 // The fix for PR17222 made it in the dylib for macOS 10.10
17 // XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.9
22 #if __cplusplus < 201103L
23 #define DISABLE_NULLPTR_TESTS
94 struct base1
{int x
;};
95 struct base2
{int x
;};
96 struct derived
: base1
, base2
{};
116 #if !defined(DISABLE_NULLPTR_TESTS)
123 assert (p
== nullptr);
140 assert ((uintptr_t)p
== 12+sizeof(base1
));
150 struct vDerived
: virtual public vBase
{};
171 #if !defined(DISABLE_NULLPTR_TESTS)
203 int main(int, char**)