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