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"
49 IncludeInserter(
const SourceManager &SourceMgr,
const LangOptions &LangOpts,
58 llvm::Optional<FixItHint>
62 void AddInclude(StringRef file_name,
bool IsAngled,
63 SourceLocation hash_location, SourceLocation end_location);
65 llvm::DenseMap<FileID, std::unique_ptr<IncludeSorter>> IncludeSorterByFile;
66 llvm::DenseMap<FileID, std::set<std::string>> InsertedHeaders;
67 const SourceManager &SourceMgr;
68 const LangOptions &LangOpts;
75 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_INCLUDEINSERTER_H
IncludeInserter(const SourceManager &SourceMgr, const LangOptions &LangOpts, IncludeSorter::IncludeStyle Style)
llvm::Optional< FixItHint > CreateIncludeInsertion(FileID FileID, llvm::StringRef Header, bool IsAngled)
bool IsAngled
true if this was an include with angle brackets
std::unique_ptr< PPCallbacks > CreatePPCallbacks()