10 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_INCLUDESORTER_H
11 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_INCLUDESORTER_H
13 #include "../ClangTidy.h"
45 IncludeSorter(
const SourceManager *SourceMgr,
const LangOptions *LangOpts,
46 const FileID FileID, StringRef FileName,
IncludeStyle Style);
54 SourceLocation HashLocation, SourceLocation EndLocation);
66 typedef SmallVector<SourceRange, 1> SourceRangeVector;
70 FixItHint CreateFixIt(SourceRange EditRange,
const std::string &NewText);
72 const SourceManager *SourceMgr;
73 const LangOptions *LangOpts;
77 StringRef CanonicalFile;
79 SourceRangeVector SourceLocations;
81 llvm::StringMap<SourceRangeVector> IncludeLocations;
88 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_INCLUDESORTER_H
Optional< FixItHint > CreateIncludeInsertion(StringRef FileName, bool IsAngled)
static IncludeStyle parseIncludeStyle(const std::string &Value)
const FileID current_FileID() const
void AddInclude(StringRef FileName, bool IsAngled, SourceLocation HashLocation, SourceLocation EndLocation)
IncludeSorter(const SourceManager *SourceMgr, const LangOptions *LangOpts, const FileID FileID, StringRef FileName, IncludeStyle Style)
static StringRef toString(IncludeStyle Style)
std::vector< FixItHint > GetEdits()
bool IsAngled
true if this was an include with angle brackets