Lines Matching refs:FormatTok
121 if (Tok.FormatTok.Tok.getLength() != Tok.FormatTok.TokenLength)
123 SourceMgr, Tok.FormatTok.Tok.getLocation().getLocWithOffset(
124 Tok.FormatTok.TokenLength),
125 Tok.FormatTok.Tok.getLength() - Tok.FormatTok.TokenLength, ""));
130 Spaces + WhitespaceStartColumn + Tok.FormatTok.TokenLength) {
132 Comment.Tok = Tok.FormatTok;
137 Comment.MaxColumn = Style.ColumnLimit - Tok.FormatTok.TokenLength;
149 indentBlockComment(Tok.FormatTok, Spaces);
151 storeReplacement(Tok.FormatTok, getNewLineText(NewLines, Spaces));
163 Tok.FormatTok,
183 SourceLocation InsertAt = Tok.FormatTok.WhiteSpaceStart
184 .getLocWithOffset(Tok.FormatTok.WhiteSpaceLength + Offset);
341 !NextLine->First.FormatTok.HasUnescapedNewline)
361 const Token &Tok = AnnotatedTok.FormatTok.Tok;
512 State.Column += State.NextToken->FormatTok.WhiteSpaceLength +
513 State.NextToken->FormatTok.TokenLength;
550 if (State.Stack.back().ColonPos > Current.FormatTok.TokenLength) {
552 State.Stack.back().ColonPos - Current.FormatTok.TokenLength;
556 State.Column + Current.FormatTok.TokenLength;
575 std::max(NewLines, std::min(Current.FormatTok.NewlinesBefore,
612 State.VariablePos = State.Column - Previous.FormatTok.TokenLength;
622 State.Column + Spaces + Current.FormatTok.TokenLength)
627 State.Column + Spaces + Current.FormatTok.TokenLength;
742 State.Column += Current.FormatTok.TokenLength;
759 if (StringRef(Current.FormatTok.Tok.getLiteralData()).find('"') != 0)
764 unsigned TailLength = Current.FormatTok.TokenLength;
765 unsigned StartColumn = State.Column - Current.FormatTok.TokenLength;
769 Current.FormatTok.Tok.getLiteralData() + TailOffset, TailLength);
950 << Current->Previous->State.NextToken->FormatTok.Tok.getName()
1069 FormatTok.NewlinesBefore = 0;
1070 FormatTok.WhiteSpaceStart =
1071 FormatTok.Tok.getLocation().getLocWithOffset(1);
1072 FormatTok.WhiteSpaceLength = 0;
1074 return FormatTok;
1077 FormatTok = FormatToken();
1078 Lex.LexFromRawLexer(FormatTok.Tok);
1079 StringRef Text = rawTokenText(FormatTok.Tok);
1080 FormatTok.WhiteSpaceStart = FormatTok.Tok.getLocation();
1081 if (SourceMgr.getFileOffset(FormatTok.WhiteSpaceStart) == 0)
1082 FormatTok.IsFirst = true;
1085 while (FormatTok.Tok.is(tok::unknown)) {
1088 FormatTok.LastNewlineOffset =
1089 FormatTok.WhiteSpaceLength + Text.rfind('\n') + 1;
1091 FormatTok.NewlinesBefore += Newlines;
1092 FormatTok.HasUnescapedNewline |= EscapedNewlines != Newlines;
1093 FormatTok.WhiteSpaceLength += FormatTok.Tok.getLength();
1095 if (FormatTok.Tok.is(tok::eof))
1096 return FormatTok;
1097 Lex.LexFromRawLexer(FormatTok.Tok);
1098 Text = rawTokenText(FormatTok.Tok);
1101 // Now FormatTok is the next non-whitespace token.
1102 FormatTok.TokenLength = Text.size();
1112 // FIXME: ++FormatTok.NewlinesBefore is missing...
1113 FormatTok.WhiteSpaceLength += 2;
1114 FormatTok.TokenLength -= 2;
1118 if (FormatTok.Tok.is(tok::raw_identifier)) {
1120 FormatTok.Tok.setIdentifierInfo(&Info);
1121 FormatTok.Tok.setKind(Info.getTokenID());
1124 if (FormatTok.Tok.is(tok::greatergreater)) {
1125 FormatTok.Tok.setKind(tok::greater);
1126 FormatTok.TokenLength = 1;
1132 if (FormatTok.Tok.is(tok::comment))
1133 FormatTok.TokenLength = Text.rtrim().size();
1135 return FormatTok;
1141 FormatToken FormatTok;
1147 /// Returns the text of \c FormatTok.
1191 const FormatToken &FirstTok = TheLine.First.FormatTok;
1242 SourceLocation LastLoc = TheLine.Last->FormatTok.Tok.getLocation();
1263 bool SpacesBefore = Tok->FormatTok.WhiteSpaceLength > 0;
1264 bool SpacesAfter = Tok->Children[0].FormatTok.WhiteSpaceLength > 0;
1273 Tok->FormatTok.WhiteSpaceLength == 0)
1348 } else if (I->InPPDirective && (I->First.FormatTok.HasUnescapedNewline ||
1349 I->First.FormatTok.IsFirst)) {
1361 if (!(I + 1)->InPPDirective || (I + 1)->First.FormatTok.HasUnescapedNewline)
1364 !(I + 2)->First.FormatTok.HasUnescapedNewline)
1380 (I + 1)->First.FormatTok.HasUnescapedNewline))
1473 const FormatToken *First = &TheLine.First.FormatTok;
1474 const FormatToken *Last = &TheLine.Last->FormatTok;
1482 const FormatToken *First = &TheLine.First.FormatTok;
1498 const FormatToken &Tok = RootToken.FormatTok;