/// \brief Gets configuration in a YAML string.
std::string configurationAsText(const FormatStyle &Style);
-/// \brief Reformats the given \p Ranges in the token stream coming out of
-/// \c Lex.
-///
-/// DEPRECATED: Do not use.
-tooling::Replacements reformat(const FormatStyle &Style, Lexer &Lex,
- SourceManager &SourceMgr,
- ArrayRef<CharSourceRange> Ranges);
-
/// \brief Reformats the given \p Ranges in the file \p ID.
///
/// Each range is extended on either end to its next bigger logic unit, i.e.
} // end anonymous namespace
-tooling::Replacements reformat(const FormatStyle &Style, Lexer &Lex,
- SourceManager &SourceMgr,
- ArrayRef<CharSourceRange> Ranges) {
- if (Style.DisableFormat)
- return tooling::Replacements();
- return reformat(Style, SourceMgr,
- SourceMgr.getFileID(Lex.getSourceLocation()), Ranges);
-}
-
tooling::Replacements reformat(const FormatStyle &Style,
SourceManager &SourceMgr, FileID ID,
ArrayRef<CharSourceRange> Ranges) {