File indexing completed on 2024-04-28 05:38:29

0001 /*
0002     SPDX-FileCopyrightText: 2017 Sergio Martins <smartins@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef CLAZY_QPROPERTY_WITHOUT_NOTIFY_H
0008 #define CLAZY_QPROPERTY_WITHOUT_NOTIFY_H
0009 
0010 #include "checkbase.h"
0011 
0012 #include <clang/Basic/SourceLocation.h>
0013 
0014 #include <string>
0015 
0016 class ClazyContext;
0017 namespace clang
0018 {
0019 class MacroInfo;
0020 class Token;
0021 } // namespace clang
0022 
0023 /**
0024  * See README-qproperty-without-notify.md for more info.
0025  */
0026 class QPropertyWithoutNotify : public CheckBase
0027 {
0028 public:
0029     explicit QPropertyWithoutNotify(const std::string &name, ClazyContext *context);
0030 
0031 private:
0032     void VisitMacroExpands(const clang::Token &MacroNameTok, const clang::SourceRange &range, const clang::MacroInfo *minfo = nullptr) override;
0033 
0034     bool m_lastIsGadget = false;
0035 };
0036 
0037 #endif