Lines Matching refs:Change
22 bool WhitespaceManager::Change::IsBeforeInFile::operator()( in operator ()()
23 const Change &C1, const Change &C2) const { in operator ()()
29 WhitespaceManager::Change::Change(const FormatToken &Tok, in Change() function in clang::format::WhitespaceManager::Change
55 Changes.push_back(Change(Tok, /*CreateReplacement=*/true, Tok.WhitespaceRange, in replaceWhitespace()
65 Changes.push_back(Change(Tok, /*CreateReplacement=*/false, in addUntouchableToken()
91 Change(Tok, /*CreateReplacement=*/true, in replaceWhitespaceInToken()
102 llvm::sort(Changes, Change::IsBeforeInFile(SourceMgr)); in generateReplacements()
119 Change *LastOutsideTokenChange = &Changes[0]; in calculateLineBreakInformation()
221 const WhitespaceManager::Change *LastBlockComment = nullptr; in calculateLineBreakInformation()
222 for (auto &Change : Changes) { in calculateLineBreakInformation() local
226 if (Change.IsInsideToken && Change.NewlinesBefore == 0) in calculateLineBreakInformation()
227 Change.IsTrailingComment = false; in calculateLineBreakInformation()
228 Change.StartOfBlockComment = nullptr; in calculateLineBreakInformation()
229 Change.IndentationOffset = 0; in calculateLineBreakInformation()
230 if (Change.Tok->is(tok::comment)) { in calculateLineBreakInformation()
231 if (Change.Tok->is(TT_LineComment) || !Change.IsInsideToken) { in calculateLineBreakInformation()
232 LastBlockComment = &Change; in calculateLineBreakInformation()
233 } else if ((Change.StartOfBlockComment = LastBlockComment)) { in calculateLineBreakInformation()
234 Change.IndentationOffset = in calculateLineBreakInformation()
235 Change.StartOfTokenColumn - in calculateLineBreakInformation()
236 Change.StartOfBlockComment->StartOfTokenColumn; in calculateLineBreakInformation()
249 for (auto &Change : Changes) { in calculateLineBreakInformation() local
250 for (unsigned i = 0, e = Change.Tok->FakeLParens.size(); i != e; ++i) { in calculateLineBreakInformation()
252 Change.Tok->FakeLParens[e - 1 - i] == prec::Conditional && in calculateLineBreakInformation()
253 !(i == 0 && Change.Tok->Previous && in calculateLineBreakInformation()
254 Change.Tok->Previous->is(TT_ConditionalExpr) && in calculateLineBreakInformation()
255 Change.Tok->Previous->is(tok::colon)); in calculateLineBreakInformation()
261 Change.ConditionalsLevel = ConditionalsLevel; in calculateLineBreakInformation()
263 for (unsigned i = Change.Tok->FakeRParens; i > 0 && ScopeStack.size(); --i) in calculateLineBreakInformation()
277 SmallVector<WhitespaceManager::Change, 16> &Changes) { in AlignTokenSequence() argument
495 SmallVector<WhitespaceManager::Change, 16> &Changes, in AlignTokens() argument
687 std::function<bool(const WhitespaceManager::Change &C)> AlignMacrosMatches, in AlignMacroSequence()
688 SmallVector<WhitespaceManager::Change, 16> &Changes) { in AlignMacroSequence() argument
726 auto AlignMacrosMatches = [](const Change &C) { in alignConsecutiveMacros()
825 [&](const Change &C) { in alignConsecutiveAssignments()
853 [&](Change const &C) { in alignConsecutiveBitFields()
873 [](Change const &C) { in alignConsecutiveDeclarations()
903 [](Change const &C) { in alignChainedConditionals()
913 static auto AlignWrappedOperand = [](Change const &C) { in alignChainedConditionals()
923 for (Change &C : Changes) in alignChainedConditionals()
928 [this](Change const &C) { in alignChainedConditionals()
1071 Change &C = Changes[i]; in alignEscapedNewlines()
1088 Change &C = Changes[i]; in alignEscapedNewlines()
1419 const Change &C = Changes[i]; in generateChanges()