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
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 __has_feature(cxx_nullptr)
66 catch (const A
* const p
)
87 catch (const A
* const)
139 int main(int, char**) {