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
19 #if __cplusplus < 201103L
20 #define DISABLE_NULLPTR_TESTS
91 struct base1
{int x
;};
92 struct base2
{int x
;};
93 struct derived
: base1
, base2
{};
113 #if !defined(DISABLE_NULLPTR_TESTS)
120 assert (p
== nullptr);
137 assert ((uintptr_t)p
== 12+sizeof(base1
));
147 struct vDerived
: virtual public vBase
{};
168 #if !defined(DISABLE_NULLPTR_TESTS)
200 int main(int, char**)