16 #ifndef LLVM_CLANG_LIB_FORMAT_WHITESPACEMANAGER_H
17 #define LLVM_CLANG_LIB_FORMAT_WHITESPACEMANAGER_H
42 : SourceMgr(SourceMgr), Style(Style), UseCRLF(UseCRLF) {}
51 unsigned StartOfTokenColumn,
52 bool InPPDirective =
false);
75 unsigned ReplaceChars,
76 StringRef PreviousPostfix,
77 StringRef CurrentPrefix,
bool InPPDirective,
78 unsigned Newlines,
int Spaces);
169 void calculateLineBreakInformation();
172 void alignConsecutiveAssignments();
175 void alignConsecutiveDeclarations();
178 void alignTrailingComments();
182 void alignTrailingComments(
unsigned Start,
unsigned End,
unsigned Column);
185 void alignEscapedNewlines();
189 void alignEscapedNewlines(
unsigned Start,
unsigned End,
unsigned Column);
192 void generateChanges();
196 void appendNewlineText(std::string &
Text,
unsigned Newlines);
197 void appendNewlineText(std::string &
Text,
unsigned Newlines,
198 unsigned PreviousEndOfTokenColumn,
199 unsigned EscapedNewlineColumn);
200 void appendIndentText(std::string &
Text,
unsigned IndentLevel,
201 unsigned Spaces,
unsigned WhitespaceStartColumn);
Defines the SourceManager interface.
This file implements a token annotator, i.e.
A trivial tuple used to represent a source range.
This class handles loading and caching of source files into memory.