File indexing completed on 2024-04-28 05:38:25
0001 /* 0002 SPDX-FileCopyrightText: 2017 Klarälvdalens Datakonsult AB a KDAB Group company info@kdab.com 0003 SPDX-FileContributor: Sérgio Martins <sergio.martins@kdab.com> 0004 0005 SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 #ifndef CLAZY_CONNECT_NOT_NORMALIZED_H 0009 #define CLAZY_CONNECT_NOT_NORMALIZED_H 0010 0011 #include "checkbase.h" 0012 0013 #include <string> 0014 0015 class ClazyContext; 0016 0017 namespace clang 0018 { 0019 class CXXConstructExpr; 0020 class CallExpr; 0021 class Expr; 0022 class Stmt; 0023 } 0024 0025 /** 0026 * See README-connect-not-normalized.md for more info. 0027 */ 0028 class ConnectNotNormalized : public CheckBase 0029 { 0030 public: 0031 explicit ConnectNotNormalized(const std::string &name, ClazyContext *context); 0032 void VisitStmt(clang::Stmt *stmt) override; 0033 0034 private: 0035 bool handleQ_ARG(clang::Stmt *); 0036 bool handleConnect(clang::CallExpr *); 0037 bool checkNormalizedLiteral(clang::StringLiteral *, clang::Expr *); 0038 }; 0039 0040 #endif