#include "DeprecatedHeadersCheck.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Lex/PPCallbacks.h"
#include "clang/Lex/Preprocessor.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringSet.h"
#include <algorithm>
#include <vector>
IncludeMarker;
namespace clang::tidy::modernize {
namespace {
class IncludeModernizePPCallbacks : public PPCallbacks { … };
class ExternCRefutationVisitor
: public RecursiveASTVisitor<ExternCRefutationVisitor> { … };
}
DeprecatedHeadersCheck::DeprecatedHeadersCheck(StringRef Name,
ClangTidyContext *Context)
: … { … }
void DeprecatedHeadersCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { … }
void DeprecatedHeadersCheck::registerPPCallbacks(
const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) { … }
void DeprecatedHeadersCheck::registerMatchers(
ast_matchers::MatchFinder *Finder) { … }
void DeprecatedHeadersCheck::onEndOfTranslationUnit() { … }
void DeprecatedHeadersCheck::check(
const ast_matchers::MatchFinder::MatchResult &Result) { … }
IncludeModernizePPCallbacks::IncludeModernizePPCallbacks(
std::vector<IncludeMarker> &IncludesToBeProcessed, LangOptions LangOpts,
const SourceManager &SM, bool CheckHeaderFile)
: … { … }
void IncludeModernizePPCallbacks::InclusionDirective(
SourceLocation HashLoc, const Token &IncludeTok, StringRef FileName,
bool IsAngled, CharSourceRange FilenameRange, OptionalFileEntryRef File,
StringRef SearchPath, StringRef RelativePath, const Module *SuggestedModule,
bool ModuleImported, SrcMgr::CharacteristicKind FileType) { … }
}