Lines Matching defs:Change
22 bool WhitespaceManager::Change::IsBeforeInFile::operator()(
23 const Change &C1, const Change &C2) const {
34 WhitespaceManager::Change::Change(const FormatToken &Tok,
60 Changes.push_back(Change(Tok, /*CreateReplacement=*/true, Tok.WhitespaceRange,
70 Changes.push_back(Change(Tok, /*CreateReplacement=*/false,
96 Change(Tok, /*CreateReplacement=*/true,
107 llvm::sort(Changes, Change::IsBeforeInFile(SourceMgr));
131 Change *LastOutsideTokenChange = &Changes[0];
233 const WhitespaceManager::Change *LastBlockComment = nullptr;
234 for (auto &Change : Changes) {
238 if (Change.IsInsideToken && Change.NewlinesBefore == 0)
239 Change.IsTrailingComment = false;
240 Change.StartOfBlockComment = nullptr;
241 Change.IndentationOffset = 0;
242 if (Change.Tok->is(tok::comment)) {
243 if (Change.Tok->is(TT_LineComment) || !Change.IsInsideToken) {
244 LastBlockComment = &Change;
245 } else if ((Change.StartOfBlockComment = LastBlockComment)) {
246 Change.IndentationOffset =
247 Change.StartOfTokenColumn -
248 Change.StartOfBlockComment->StartOfTokenColumn;
261 for (auto &Change : Changes) {
262 for (unsigned i = 0, e = Change.Tok->FakeLParens.size(); i != e; ++i) {
264 Change.Tok->FakeLParens[e - 1 - i] == prec::Conditional &&
265 !(i == 0 && Change.Tok->Previous &&
266 Change.Tok->Previous->is(TT_ConditionalExpr) &&
267 Change.Tok->Previous->is(tok::colon));
273 Change.ConditionalsLevel = ConditionalsLevel;
275 for (unsigned i = Change.Tok->FakeRParens; i > 0 && ScopeStack.size(); --i)
289 SmallVector<WhitespaceManager::Change, 16> &Changes) {
529 SmallVector<WhitespaceManager::Change, 16> &Changes,
576 // We need to adjust the StartOfTokenColumn of each Change that is on a line
699 // We need to adjust the StartOfTokenColumn of each Change that is on a line
703 std::function<bool(const WhitespaceManager::Change &C)> Matches,
704 SmallVector<WhitespaceManager::Change, 16> &Changes) {
740 auto AlignMacrosMatches = [](const Change &C) {
832 [&](const Change &C) {
870 [&](Change const &C) {
896 auto Matches = [&](const Change &C) {
1014 [&](Change const &C) {
1051 [](Change const &C) {
1061 static auto AlignWrappedOperand = [](Change const &C) {
1071 for (Change &C : Changes)
1076 [this](Change const &C) {
1260 Change &C = Changes[i];
1281 Change &C = Changes[i];
1411 auto &Change = Changes[Next->Index];
1412 Change.Spaces =
1413 Change.NewlinesBefore == 0 ? BracePadding : CellDescs.InitialSpaces;
1619 const Change &C = Changes[i];
1709 void WhitespaceManager::appendNewlineText(std::string &Text, const Change &C) {