15 #ifndef COVERAGECHECKER_H 16 #define COVERAGECHECKER_H 18 #include "clang/Basic/Diagnostic.h" 19 #include "clang/Basic/FileManager.h" 20 #include "clang/Basic/LangOptions.h" 21 #include "clang/Basic/TargetInfo.h" 22 #include "clang/Basic/TargetOptions.h" 23 #include "clang/Frontend/TextDiagnosticPrinter.h" 24 #include "clang/Lex/HeaderSearch.h" 25 #include "clang/Lex/HeaderSearchOptions.h" 26 #include "clang/Lex/ModuleMap.h" 27 #include "clang/Lex/Preprocessor.h" 28 #include "llvm/ADT/StringSet.h" 29 #include "llvm/Support/Host.h" 43 llvm::StringRef ModuleMapPath;
48 std::vector<std::string> IncludePaths;
50 llvm::ArrayRef<std::string> CommandLine;
52 clang::ModuleMap *ModMap;
58 std::string ModuleMapDirectory;
60 llvm::StringSet<llvm::MallocAllocator> ModuleMapHeadersSet;
63 std::vector<std::string> FileSystemHeaders;
65 std::vector<std::string> UnaccountedForHeaders;
80 std::vector<std::string> &IncludePaths,
81 llvm::ArrayRef<std::string> CommandLine,
82 clang::ModuleMap *ModuleMap);
95 llvm::StringRef ModuleMapPath, std::vector<std::string> &IncludePaths,
96 llvm::ArrayRef<std::string> CommandLine, clang::ModuleMap *ModuleMap);
164 #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.