File indexing completed on 2024-04-28 05:38:26
0001 /* 0002 SPDX-FileCopyrightText: 2023 Johnny Jazeix <jazeix@gmail.com> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef CLAZY_NO_MODULE_INCLUDE_H 0008 #define CLAZY_NO_MODULE_INCLUDE_H 0009 0010 #include "checkbase.h" 0011 0012 #include <string> 0013 #include <vector> 0014 0015 class ClazyContext; 0016 namespace clang 0017 { 0018 class Stmt; 0019 } // namespace clang 0020 0021 /** 0022 * See README-no-module-include.md for more info. 0023 */ 0024 class NoModuleInclude : public CheckBase 0025 { 0026 public: 0027 explicit NoModuleInclude(const std::string &name, ClazyContext *context); 0028 void VisitInclusionDirective(clang::SourceLocation HashLoc, 0029 const clang::Token &IncludeTok, 0030 clang::StringRef FileName, 0031 bool IsAngled, 0032 clang::CharSourceRange FilenameRange, 0033 clazy::OptionalFileEntryRef File, 0034 clang::StringRef SearchPath, 0035 clang::StringRef RelativePath, 0036 const clang::Module *Imported, 0037 clang::SrcMgr::CharacteristicKind FileType) override; 0038 0039 private: 0040 const std::vector<std::string> m_modulesList; 0041 }; 0042 0043 #endif