Home | History | Annotate | Download | only in Format

Lines Matching defs:Change

21 bool WhitespaceManager::Change::IsBeforeInFile::
22 operator()(const Change &C1, const Change &C2) const {
28 WhitespaceManager::Change::Change(
58 Change(true, Tok.WhitespaceRange, IndentLevel, Spaces, StartOfTokenColumn,
68 Change(false, Tok.WhitespaceRange, /*IndentLevel=*/0,
81 Changes.push_back(Change(
85 // If we don't add a newline this change doesn't start a comment. Thus,
86 // when we align line comments, we don't need to treat this change as one.
87 // FIXME: We still need to take this change in account to properly
99 std::sort(Changes.begin(), Changes.end(), Change::IsBeforeInFile(SourceMgr));
134 const WhitespaceManager::Change *LastBlockComment = nullptr;
135 for (auto &Change : Changes) {
136 Change.StartOfBlockComment = nullptr;
137 Change.IndentationOffset = 0;
138 if (Change.Kind == tok::comment) {
139 LastBlockComment = &Change;
140 } else if (Change.Kind == tok::unknown) {
141 if ((Change.StartOfBlockComment = LastBlockComment))
142 Change.IndentationOffset =
143 Change.StartOfTokenColumn -
144 Change.StartOfBlockComment->StartOfTokenColumn;
155 SmallVector<WhitespaceManager::Change, 16> &Changes) {
188 SmallVector<WhitespaceManager::Change, 16> &Changes) {
219 // We need to adjust the StartOfTokenColumn of each Change that is on a line
301 [&](const Change &C) {
326 AlignTokens(Style, [](Change const &C) { return C.IsStartOfDeclName; },
424 Change &C = Changes[i];
441 Change &C = Changes[i];
454 const Change &C = Changes[i];
479 // Don't create a replacement, if it does not change anything.