Debian Codegraph @

src/checks/level2/rule-of-three.h

raw
1 /*
2 SPDX-FileCopyrightText: 2015 Sergio Martins <[email protected]>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
7 #ifndef CLANG_LAZY_RULE_OF_THREE_H
8 #define CLANG_LAZY_RULE_OF_THREE_H
9
10 #include "checks/ruleofbase.h"
11
12 #include <string>
13
14 /**
15 * Finds classes or structs which violate the rule of three.
16 * If a class has dtor, copy-dtor or copy-assign operator it should have all three.
17 *
18 * See README-rule-of-three for more information
19 */
20 class RuleOfThree : public RuleOfBase
21 {
22 public:
23 explicit RuleOfThree(const std::string &name, Options options);
24 void VisitDecl(clang::Decl *d) override;
25
26 private:
27 bool shouldIgnoreType(const std::string &className) const;
28 };
29
30 #endif