Debian Codegraph @

src/checks/requiredresults.h

raw
1 /*
2 SPDX-FileCopyrightText: 2015 Klarälvdalens Datakonsult AB a KDAB Group company [email protected]
3 SPDX-FileContributor: Sérgio Martins <[email protected]>
4
5 SPDX-FileCopyrightText: 2015 Sergio Martins <[email protected]>
6
7 SPDX-License-Identifier: LGPL-2.0-or-later
8 */
9
10 #ifndef REQUIRED_RESULTS_H
11 #define REQUIRED_RESULTS_H
12
13 #include "checkbase.h"
14
15 #include <string>
16
17 /**
18 * Warns if a result of a const member function is ignored.
19 * There are lots of false positives. QDir::mkdir() for example.
20 */
21 class RequiredResults : public CheckBase
22 {
23 public:
24 RequiredResults(const std::string &name);
25 void VisitStmt(clang::Stmt *stm) override;
26
27 private:
28 bool shouldIgnoreMethod(const std::string &qualifiedName);
29 };
30
31 #endif