14 #ifndef COVERAGECHECKER_H 15 #define COVERAGECHECKER_H 17 #include "clang/Basic/Diagnostic.h" 18 #include "clang/Basic/FileManager.h" 19 #include "clang/Basic/LangOptions.h" 20 #include "clang/Basic/TargetInfo.h" 21 #include "clang/Basic/TargetOptions.h" 22 #include "clang/Frontend/TextDiagnosticPrinter.h" 23 #include "clang/Lex/HeaderSearch.h" 24 #include "clang/Lex/HeaderSearchOptions.h" 25 #include "clang/Lex/ModuleMap.h" 26 #include "clang/Lex/Preprocessor.h" 27 #include "llvm/ADT/StringSet.h" 28 #include "llvm/Support/Host.h" 42 llvm::StringRef ModuleMapPath;
47 std::vector<std::string> IncludePaths;
49 llvm::ArrayRef<std::string> CommandLine;
51 clang::ModuleMap *ModMap;
57 std::string ModuleMapDirectory;
59 llvm::StringSet<llvm::MallocAllocator> ModuleMapHeadersSet;
62 std::vector<std::string> FileSystemHeaders;
64 std::vector<std::string> UnaccountedForHeaders;
79 std::vector<std::string> &IncludePaths,
80 llvm::ArrayRef<std::string> CommandLine,
81 clang::ModuleMap *ModuleMap);
94 llvm::StringRef ModuleMapPath, std::vector<std::string> &IncludePaths,
95 llvm::ArrayRef<std::string> CommandLine, clang::ModuleMap *ModuleMap);
163 #endif // COVERAGECHECKER_H bool collectUmbrellaHeaders(llvm::StringRef UmbrellaDirName)
Collect headers from an umbrella directory.
CoverageChecker(llvm::StringRef ModuleMapPath, std::vector< std::string > &IncludePaths, llvm::ArrayRef< std::string > CommandLine, clang::ModuleMap *ModuleMap)
Constructor.
void collectModuleHeaders()
Collect module headers.
void collectUmbrellaHeaderHeader(llvm::StringRef HeaderName)
Called from CoverageCheckerCallbacks to track a header included from an umbrella header.
void findUnaccountedForHeaders()
Find headers unaccounted-for in module map.
bool collectUmbrellaHeaderHeaders(llvm::StringRef UmbrellaHeaderName)
Collect headers rferenced from an umbrella file.
static std::unique_ptr< CoverageChecker > createCoverageChecker(llvm::StringRef ModuleMapPath, std::vector< std::string > &IncludePaths, llvm::ArrayRef< std::string > CommandLine, clang::ModuleMap *ModuleMap)
Create instance of CoverageChecker.
std::error_code doChecks()
Do checks.
bool collectFileSystemHeaders()
Collect file system header files.
Module map checker class.