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()
125 Change *LastOutsideTokenChange = &Changes[0]; in calculateLineBreakInformation()
227 const WhitespaceManager::Change *LastBlockComment = nullptr; in calculateLineBreakInformation()
228 for (auto &Change : Changes) { in calculateLineBreakInformation() local
232 if (Change.IsInsideToken && Change.NewlinesBefore == 0) in calculateLineBreakInformation()
233 Change.IsTrailingComment = false; in calculateLineBreakInformation()
234 Change.StartOfBlockComment = nullptr; in calculateLineBreakInformation()
235 Change.IndentationOffset = 0; in calculateLineBreakInformation()
236 if (Change.Tok->is(tok::comment)) { in calculateLineBreakInformation()
237 if (Change.Tok->is(TT_LineComment) || !Change.IsInsideToken) { in calculateLineBreakInformation()
238 LastBlockComment = &Change; in calculateLineBreakInformation()
239 } else if ((Change.StartOfBlockComment = LastBlockComment)) { in calculateLineBreakInformation()
240 Change.IndentationOffset = in calculateLineBreakInformation()
241 Change.StartOfTokenColumn - in calculateLineBreakInformation()
242 Change.StartOfBlockComment->StartOfTokenColumn; in calculateLineBreakInformation()
255 for (auto &Change : Changes) { in calculateLineBreakInformation() local
256 for (unsigned i = 0, e = Change.Tok->FakeLParens.size(); i != e; ++i) { in calculateLineBreakInformation()
258 Change.Tok->FakeLParens[e - 1 - i] == prec::Conditional && in calculateLineBreakInformation()
259 !(i == 0 && Change.Tok->Previous && in calculateLineBreakInformation()
260 Change.Tok->Previous->is(TT_ConditionalExpr) && in calculateLineBreakInformation()
261 Change.Tok->Previous->is(tok::colon)); in calculateLineBreakInformation()
267 Change.ConditionalsLevel = ConditionalsLevel; in calculateLineBreakInformation()
269 for (unsigned i = Change.Tok->FakeRParens; i > 0 && ScopeStack.size(); --i) in calculateLineBreakInformation()
283 SmallVector<WhitespaceManager::Change, 16> &Changes) { in AlignTokenSequence() argument
521 SmallVector<WhitespaceManager::Change, 16> &Changes, in AlignTokens() argument
695 std::function<bool(const WhitespaceManager::Change &C)> Matches, in AlignMatchingTokenSequence()
696 SmallVector<WhitespaceManager::Change, 16> &Changes) { in AlignMatchingTokenSequence() argument
732 auto AlignMacrosMatches = [](const Change &C) { in alignConsecutiveMacros()
824 [&](const Change &C) { in alignConsecutiveAssignments()
857 [&](Change const &C) { in alignConsecutiveBitFields()
877 auto Matches = [&](const Change &C) { in alignConsecutiveShortCaseStatements()
981 [&](Change const &C) { in alignConsecutiveDeclarations()
1018 [](Change const &C) { in alignChainedConditionals()
1028 static auto AlignWrappedOperand = [](Change const &C) { in alignChainedConditionals()
1038 for (Change &C : Changes) in alignChainedConditionals()
1043 [this](Change const &C) { in alignChainedConditionals()
1224 Change &C = Changes[i]; in alignEscapedNewlines()
1241 Change &C = Changes[i]; in alignEscapedNewlines()
1371 auto &Change = Changes[Next->Index]; in alignArrayInitializersLeftJustified() local
1372 Change.Spaces = in alignArrayInitializersLeftJustified()
1373 Change.NewlinesBefore == 0 ? BracePadding : CellDescs.InitialSpaces; in alignArrayInitializersLeftJustified()
1579 const Change &C = Changes[i]; in generateChanges()