File indexing completed on 2024-04-28 05:38:26
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_QCOLOR_FROM_LITERAL_H 0008 #define CLAZY_QCOLOR_FROM_LITERAL_H 0009 0010 #include "checkbase.h" 0011 0012 #include <string> 0013 0014 class QColorFromLiteral_Callback; 0015 class ClazyContext; 0016 namespace clang 0017 { 0018 class Stmt; 0019 namespace ast_matchers 0020 { 0021 class MatchFinder; 0022 } // namespace ast_matchers 0023 } // namespace clang 0024 0025 /** 0026 * See README-qcolor-from-literal.md for more info. 0027 */ 0028 class QColorFromLiteral : public CheckBase 0029 { 0030 public: 0031 explicit QColorFromLiteral(const std::string &name, ClazyContext *context); 0032 ~QColorFromLiteral() override; 0033 void VisitStmt(clang::Stmt *stmt) override; 0034 void registerASTMatchers(clang::ast_matchers::MatchFinder &) override; 0035 0036 private: 0037 ClazyAstMatcherCallback *const m_astMatcherCallBack; 0038 }; 0039 0040 #endif