| 1 |
/* |
| 2 |
SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]> |
| 3 |
SPDX-FileContributor: Shivam Kunwar <[email protected]> |
| 4 |
|
| 5 |
SPDX-License-Identifier: LGPL-2.0-or-later |
| 6 |
*/ |
| 7 |
|
| 8 |
#ifndef CLAZY_COMPARE_MEMBER_CHECK_H |
| 9 |
#define CLAZY_COMPARE_MEMBER_CHECK_H |
| 10 |
|
| 11 |
#include "checkbase.h" |
| 12 |
|
| 13 |
#include <memory> |
| 14 |
|
| 15 |
class ClazyContext; |
| 16 |
|
| 17 |
namespace clang |
| 18 |
{ |
| 19 |
class Stmt; |
| 20 |
class VarDecl; |
| 21 |
class CXXRecordDecl; |
| 22 |
class QualType; |
| 23 |
} // namespace clang |
| 24 |
|
| 25 |
class CompareMemberCheck : public CheckBase |
| 26 |
{ |
| 27 |
public: |
| 28 |
using CheckBase::CheckBase; |
| 29 |
~CompareMemberCheck(); |
| 30 |
void registerASTMatchers(clang::ast_matchers::MatchFinder &) override; |
| 31 |
|
| 32 |
private: |
| 33 |
std::unique_ptr<ClazyAstMatcherCallback> m_astMatcherCallBack; // TODO: add std::propagate_const |
| 34 |
}; |
| 35 |
|
| 36 |
#endif |