Lines Matching refs:Change
22 bool WhitespaceManager::Change::IsBeforeInFile::operator()( in operator ()()
23 const Change &C1, const Change &C2) const { in operator ()()
34 WhitespaceManager::Change::Change(const FormatToken &Tok, in Change() function in clang::format::WhitespaceManager::Change
60 Changes.push_back(Change(Tok, /*CreateReplacement=*/true, Tok.WhitespaceRange, in replaceWhitespace()
70 Changes.push_back(Change(Tok, /*CreateReplacement=*/false, in addUntouchableToken()
96 Change(Tok, /*CreateReplacement=*/true, in replaceWhitespaceInToken()
107 llvm::sort(Changes, Change::IsBeforeInFile(SourceMgr)); in generateReplacements()
131 Change *LastOutsideTokenChange = &Changes[0]; in calculateLineBreakInformation()
233 const WhitespaceManager::Change *LastBlockComment = nullptr; in calculateLineBreakInformation()
234 for (auto &Change : Changes) { in calculateLineBreakInformation() local
238 if (Change.IsInsideToken && Change.NewlinesBefore == 0) in calculateLineBreakInformation()
239 Change.IsTrailingComment = false; in calculateLineBreakInformation()
240 Change.StartOfBlockComment = nullptr; in calculateLineBreakInformation()
241 Change.IndentationOffset = 0; in calculateLineBreakInformation()
242 if (Change.Tok->is(tok::comment)) { in calculateLineBreakInformation()
243 if (Change.Tok->is(TT_LineComment) || !Change.IsInsideToken) { in calculateLineBreakInformation()
244 LastBlockComment = &Change; in calculateLineBreakInformation()
245 } else if ((Change.StartOfBlockComment = LastBlockComment)) { in calculateLineBreakInformation()
246 Change.IndentationOffset = in calculateLineBreakInformation()
247 Change.StartOfTokenColumn - in calculateLineBreakInformation()
248 Change.StartOfBlockComment->StartOfTokenColumn; in calculateLineBreakInformation()
261 for (auto &Change : Changes) { in calculateLineBreakInformation() local
262 for (unsigned i = 0, e = Change.Tok->FakeLParens.size(); i != e; ++i) { in calculateLineBreakInformation()
264 Change.Tok->FakeLParens[e - 1 - i] == prec::Conditional && in calculateLineBreakInformation()
265 !(i == 0 && Change.Tok->Previous && in calculateLineBreakInformation()
266 Change.Tok->Previous->is(TT_ConditionalExpr) && in calculateLineBreakInformation()
267 Change.Tok->Previous->is(tok::colon)); in calculateLineBreakInformation()
273 Change.ConditionalsLevel = ConditionalsLevel; in calculateLineBreakInformation()
275 for (unsigned i = Change.Tok->FakeRParens; i > 0 && ScopeStack.size(); --i) in calculateLineBreakInformation()
289 SmallVector<WhitespaceManager::Change, 16> &Changes) { in AlignTokenSequence() argument
529 SmallVector<WhitespaceManager::Change, 16> &Changes, in AlignTokens() argument
703 std::function<bool(const WhitespaceManager::Change &C)> Matches, in AlignMatchingTokenSequence()
704 SmallVector<WhitespaceManager::Change, 16> &Changes) { in AlignMatchingTokenSequence() argument
740 auto AlignMacrosMatches = [](const Change &C) { in alignConsecutiveMacros()
832 [&](const Change &C) { in alignConsecutiveAssignments()
870 [&](Change const &C) { in alignConsecutiveColons()
896 auto Matches = [&](const Change &C) { in alignConsecutiveShortCaseStatements()
1014 [&](Change const &C) { in alignConsecutiveDeclarations()
1051 [](Change const &C) { in alignChainedConditionals()
1061 static auto AlignWrappedOperand = [](Change const &C) { in alignChainedConditionals()
1071 for (Change &C : Changes) in alignChainedConditionals()
1076 [this](Change const &C) { in alignChainedConditionals()
1260 Change &C = Changes[i]; in alignEscapedNewlines()
1281 Change &C = Changes[i]; in alignEscapedNewlines()
1411 auto &Change = Changes[Next->Index]; in alignArrayInitializersLeftJustified() local
1412 Change.Spaces = in alignArrayInitializersLeftJustified()
1413 Change.NewlinesBefore == 0 ? BracePadding : CellDescs.InitialSpaces; in alignArrayInitializersLeftJustified()
1619 const Change &C = Changes[i]; in generateChanges()