10 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_INCLUDEINSERTER_H 11 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_INCLUDEINSERTER_H 14 #include "clang/Basic/Diagnostic.h" 15 #include "clang/Basic/LangOptions.h" 16 #include "clang/Basic/SourceManager.h" 17 #include "clang/Lex/PPCallbacks.h" 59 IncludeInserter(
const SourceManager &SourceMgr,
const LangOptions &LangOpts,
68 llvm::Optional<FixItHint>
72 void AddInclude(StringRef
FileName,
bool IsAngled,
73 SourceLocation HashLocation, SourceLocation EndLocation);
75 llvm::DenseMap<FileID, std::unique_ptr<IncludeSorter>> IncludeSorterByFile;
76 llvm::DenseMap<FileID, std::set<std::string>> InsertedHeaders;
77 const SourceManager &SourceMgr;
78 const LangOptions &LangOpts;
86 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_INCLUDEINSERTER_H std::unique_ptr< PPCallbacks > CreatePPCallbacks()
Create PPCallbacks for registration with the compiler's preprocessor.
IncludeStyle
Supported include styles.
bool IsAngled
true if this was an include with angle brackets
IncludeInserter(const SourceManager &SourceMgr, const LangOptions &LangOpts, IncludeSorter::IncludeStyle Style)
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
Produces fixes to insert specified includes to source files, if not yet present.
llvm::Optional< FixItHint > CreateIncludeInsertion(FileID FileID, llvm::StringRef Header, bool IsAngled)
Creates a Header inclusion directive fixit.