16 #ifndef LLVM_CLANG_LIB_FORMAT_WHITESPACEMANAGER_H
17 #define LLVM_CLANG_LIB_FORMAT_WHITESPACEMANAGER_H
42 : SourceMgr(SourceMgr), Style(Style), UseCRLF(UseCRLF) {}
50 unsigned IndentLevel,
unsigned Spaces,
51 unsigned StartOfTokenColumn,
52 bool InPPDirective =
false);
75 unsigned ReplaceChars,
76 StringRef PreviousPostfix,
77 StringRef CurrentPrefix,
bool InPPDirective,
78 unsigned Newlines,
unsigned IndentLevel,
171 void calculateLineBreakInformation();
174 void alignConsecutiveAssignments();
177 void alignConsecutiveDeclarations();
180 void alignTrailingComments();
184 void alignTrailingComments(
unsigned Start,
unsigned End,
unsigned Column);
187 void alignEscapedNewlines();
191 void alignEscapedNewlines(
unsigned Start,
unsigned End,
unsigned Column);
194 void generateChanges();
198 void appendNewlineText(std::string &
Text,
unsigned Newlines);
199 void appendNewlineText(std::string &
Text,
unsigned Newlines,
200 unsigned PreviousEndOfTokenColumn,
201 unsigned EscapedNewlineColumn);
202 void appendIndentText(std::string &
Text,
unsigned IndentLevel,
203 unsigned Spaces,
unsigned WhitespaceStartColumn);
Defines the SourceManager interface.
This file implements a token annotator, i.e.
TokenKind
Provides a simple uniform namespace for tokens from all C languages.
A trivial tuple used to represent a source range.
This class handles loading and caching of source files into memory.