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

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_STRICT_ITERATORS_H
0008 #define CLAZY_STRICT_ITERATORS_H
0009 
0010 #include "checkbase.h"
0011 
0012 #include <string>
0013 
0014 class ClazyContext;
0015 
0016 namespace clang
0017 {
0018 class CXXConstructExpr;
0019 class ImplicitCastExpr;
0020 class CXXOperatorCallExpr;
0021 class Stmt;
0022 }
0023 
0024 /**
0025  * See README-strict-iterators.md for more info.
0026  */
0027 class StrictIterators : public CheckBase
0028 {
0029 public:
0030     explicit StrictIterators(const std::string &name, ClazyContext *context);
0031     void VisitStmt(clang::Stmt *stmt) override;
0032 
0033 private:
0034     bool handleImplicitCast(clang::ImplicitCastExpr *);
0035     bool handleOperator(clang::CXXOperatorCallExpr *);
0036 };
0037 
0038 #endif