Clang Project

clang_source_code/test/CXX/special/class.dtor/p5-implicit.cpp
1// RUN: %clang_cc1 -std=c++11 %s -ast-dump | FileCheck %s
2
3struct A { ~A() = delete; };
4// CHECK-LABEL: CXXRecordDecl {{.*}} struct A
5// CHECK: Destructor trivial user_declared
6
7struct B : A {};
8// CHECK-LABEL: CXXRecordDecl {{.*}} struct B
9// CHECK: Destructor trivial needs_overload_resolution
10
11struct C : B {};
12// CHECK-LABEL: CXXRecordDecl {{.*}} struct C
13// CHECK: Destructor trivial needs_overload_resolution
14
15struct D { ~D(); };
16struct E : D {};
17union U {
18  E e;
19};
20// CHECK-LABEL: CXXRecordDecl {{.*}} union U
21// CHECK: Destructor non_trivial needs_implicit defaulted_is_deleted
22