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
14 #pragma GCC diagnostic ignored "-Wunreachable-code"
22 ~A() {assert(id_
== count
--);}
26 A
& operator=(const A
&);
36 ~B() {assert(id_
== count
--);}
40 B
& operator=(const B
&);
50 ~C() {assert(id_
== count
--);}
54 C
& operator=(const C
&);
98 assert(A::count
== 0);
99 assert(B::count
== 0);
100 assert(C::count
== 0);