1 // RUN: %check_clang_tidy -std=c++98 %s cppcoreguidelines-special-member-functions %t
2 
3 class DefinesDestructor {
4   ~DefinesDestructor();
5 };
6 // CHECK-MESSAGES: [[@LINE-3]]:7: warning: class 'DefinesDestructor' defines a non-default destructor but does not define a copy constructor or a copy assignment operator [cppcoreguidelines-special-member-functions]
7 
8 class DefinesCopyConstructor {
9   DefinesCopyConstructor(const DefinesCopyConstructor &);
10 };
11 // CHECK-MESSAGES: [[@LINE-3]]:7: warning: class 'DefinesCopyConstructor' defines a copy constructor but does not define a destructor or a copy assignment operator [cppcoreguidelines-special-member-functions]
12 
13 class DefinesCopyAssignment {
14   DefinesCopyAssignment &operator=(const DefinesCopyAssignment &);
15 };
16 // CHECK-MESSAGES: [[@LINE-3]]:7: warning: class 'DefinesCopyAssignment' defines a copy assignment operator but does not define a destructor or a copy constructor [cppcoreguidelines-special-member-functions]
17 
18 class DefinesNothing {
19 };
20 
21 class DefinesEverything {
22   DefinesEverything(const DefinesEverything &);
23   DefinesEverything &operator=(const DefinesEverything &);
24   ~DefinesEverything();
25 };
26 
27