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/TargetParser/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,
81 clang::ModuleMap *ModuleMap);
94 llvm::StringRef ModuleMapPath, std::vector<std::string> &IncludePaths,
95 llvm::ArrayRef<std::string>
CommandLine, clang::ModuleMap *ModuleMap);
std::vector< llvm::StringRef > CommandLine
Module map checker class.
bool collectFileSystemHeaders(llvm::StringRef IncludePath)
Collect file system header files from the given path.
void findUnaccountedForHeaders()
Find headers unaccounted-for in module map.
bool collectUmbrellaHeaderHeaders(llvm::StringRef UmbrellaHeaderName)
Collect headers referenced from an umbrella file.
void collectModuleHeaders()
Collect module headers.
std::error_code doChecks()
Do checks.
bool collectUmbrellaHeaders(llvm::StringRef UmbrellaDirName)
Collect headers from an umbrella directory.
bool collectFileSystemHeaders()
Collect file system header files.
void collectUmbrellaHeaderHeader(llvm::StringRef HeaderName)
Called from CoverageCheckerCallbacks to track a header included from an umbrella header.
bool collectModuleHeaders(const clang::Module &Mod)
Collect referenced headers from one module.
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.