reference, declaration → definition definition → references, declarations, derived classes, virtual overrides reference to multiple definitions → definitions unreferenced |
30 Line->LeadingEmptyLinesAffected = affectsLeadingEmptyLines(*Line->First); 37 while (PPEnd != E && !(*PPEnd)->First->HasUnescapedNewline) { 42 if (affectsTokenRange(*Line->First, *Last, 119 for (FormatToken *Tok = Line->First; Tok; Tok = Tok->Next) { 134 Line->First->NewlinesBefore == 0; 137 Line->First->is(tok::comment) && Line->First->Next == nullptr && 137 Line->First->is(tok::comment) && Line->First->Next == nullptr && 138 Line->First->NewlinesBefore < 2 && PreviousLine && 142 Line->First->is(tok::r_brace) &&tools/clang/lib/Format/ContinuationIndenter.cpp
241 if (FirstStartColumn && Line->First->NewlinesBefore == 0) 253 State.NextToken = Line->First; 548 (State.Line->First->is(tok::kw_for) || Current.NestingLevel == 0) && 938 State.Line->First->is(tok::kw_enum)) 939 return (Style.IndentWidth * State.Line->First->IndentLevel) + 1436 (Current.is(tok::r_brace) && State.NextToken != State.Line->First) ||tools/clang/lib/Format/Format.cpp
1268 for (FormatToken *FormatTok = Line->First; FormatTok; 1381 for (FormatToken *Tok = Line->First->Next; Tok; Tok = Tok->Next) { 1398 for (FormatToken *Tok = Line->First; Tok && Tok->Next; Tok = Tok->Next) { 1419 if (!AnnotatedLines[i]->First->Next) 1421 FormatToken *Tok = AnnotatedLines[i]->First->Next; 1484 cleanupRight(Line->First, tok::comma, tok::comma); 1485 cleanupRight(Line->First, TT_CtorInitializerColon, tok::comma); 1486 cleanupRight(Line->First, tok::l_paren, tok::comma); 1487 cleanupLeft(Line->First, tok::comma, tok::r_paren); 1488 cleanupLeft(Line->First, TT_CtorInitializerComma, tok::l_brace); 1489 cleanupLeft(Line->First, TT_CtorInitializerColon, tok::l_brace); 1490 cleanupLeft(Line->First, TT_CtorInitializerColon, tok::equal); 1495 for (FormatToken *Tok = Line.First; Tok != nullptr; Tok = Tok->Next) { 1513 FormatToken *Tok = AnnotatedLines[Line]->First; 1567 AnnotatedLines[InitLine]->First->Tok.getLocation(), 1772 for (const FormatToken *FormatTok = Line->First; FormatTok;tools/clang/lib/Format/NamespaceEndCommentsFixer.cpp
163 const FormatToken *NamespaceTok = AnnotatedLines[StartLineIndex]->First; 168 NamespaceTok = AnnotatedLines[StartLineIndex - 1]->First; 200 FormatToken *RBraceTok = EndLine->First; 221 !AnnotatedLines[I + 1]->First->Finalized) { 241 EndCommentNextTok = AnnotatedLines[I + 1]->First;tools/clang/lib/Format/SortJavaScriptImports.cpp
186 if (FirstNonImportLine && FirstNonImportLine->First->NewlinesBefore < 2) 284 Current = Line->First; 291 Start = Line->First->Tok.getLocation();tools/clang/lib/Format/TokenAnnotator.cpp
68 : Style(Style), Line(Line), CurrentToken(Line.First), AutoFound(false), 768 !Line.First->isOneOf(tok::kw_enum, tok::kw_case)) || 821 !Line.First->isOneOf(tok::kw_enum, tok::kw_case)) { 1181 if (Line.First->is(tok::kw_export) && 1296 !Line.First->isOneOf(tok::kw_template, tok::kw_using, tok::kw_return) && 1806 : Style(Style), Keywords(Keywords), Current(Line.First) {} 2008 for (const FormatToken *Tok = (*I)->First; Tok; Tok = Tok->Next) { 2018 NextNonCommentLine->First->NewlinesBefore <= 1 && 2019 NextNonCommentLine->First->OriginalColumn == 2020 (*I)->First->OriginalColumn) { 2031 NextNonCommentLine = (*I)->First->isNot(tok::r_brace) ? (*I) : nullptr; 2040 for (const auto *Tok = Line.First; Tok != nullptr; Tok = Tok->Next) 2074 Line.First->SpacesRequiredBefore = 1; 2075 Line.First->CanBreakBefore = Line.First->MustBreakBefore; 2075 Line.First->CanBreakBefore = Line.First->MustBreakBefore; 2189 Line.First->TotalLength = 2190 Line.First->IsMultiline ? Style.ColumnLimit 2191 : Line.FirstStartColumn + Line.First->ColumnWidth; 2192 FormatToken *Current = Line.First->Next; 2248 Prev->Children[0]->First->MustBreakBefore) || 2281 for (Current = Line.First; Current != nullptr; Current = Current->Next) { 2587 (Left.NestingLevel == 1 && Line.First->is(tok::kw_for))))))); 2831 Line.First->isOneOf(Keywords.kw_import, tok::kw_export)) 2893 if (Line.First->isOneOf(tok::kw_case, tok::kw_default) || 3006 Line.First->isOneOf(tok::identifier, Keywords.kw_import, tok::kw_export, 3010 !Line.First->isOneOf(Keywords.kw_var, Keywords.kw_let)) 3539 const FormatToken *Tok = Line.First;tools/clang/lib/Format/TokenAnnotator.h
53 First->Previous = nullptr; 54 FormatToken *Current = First; 76 FormatToken *Current = First; 87 return First && First->startsSequence(Tokens...); 87 return First && First->startsSequence(Tokens...);tools/clang/lib/Format/UnwrappedLineFormatter.cpp
23 const FormatToken *Next = Line.First->getNextNonComment(); 54 Offset = getIndentOffset(*Line.First); 82 unsigned LevelIndent = Line.First->OriginalColumn; 85 if ((!Line.First->is(tok::comment) || IndentForLevel[Line.Level] == -1) && 146 return AnnotatedLines[StartLineIndex]->First->getNamespaceToken(); 150 const FormatToken *NamespaceToken = Line->First->getNamespaceToken(); 181 if (Next[i + 1]->First->NewlinesBefore > 0) 205 if (I[1]->Type == LT_Invalid || I[1]->First->MustBreakBefore) 208 (!I[1]->InPPDirective || I[1]->First->HasUnescapedNewline)) 223 TheLine->First == TheLine->Last && 225 I[1]->First->is(tok::r_brace)) 229 if (TheLine->Last->is(tok::l_brace) && TheLine->First == TheLine->Last && 231 bool EmptyBlock = I[1]->First->is(tok::r_brace); 233 const FormatToken *Tok = I[-1]->First; 256 I[1]->First->is(tok::r_brace)) || 261 if (auto nsToken = TheLine->First->getNamespaceToken()) { 286 I[i + 1]->First->SpacesRequiredBefore = !I[i]->Last->is(tok::r_brace); 297 TheLine->First != TheLine->Last) { 301 if (TheLine->Last->is(tok::l_brace) && TheLine->First != TheLine->Last && 302 TheLine->First->isOneOf(tok::kw_if, tok::kw_while, tok::kw_for)) { 308 if (I[1]->First->is(tok::l_brace) && 309 (TheLine->First->isOneOf(tok::kw_if, tok::kw_while, tok::kw_for, 311 (TheLine->First->is(tok::r_brace) && TheLine->First->Next && 311 (TheLine->First->is(tok::r_brace) && TheLine->First->Next && 312 TheLine->First->Next->isOneOf(tok::kw_else, tok::kw_catch))) && 322 } else if (I[1]->First->is(tok::l_brace) && 323 TheLine->First->isOneOf(tok::kw_if, tok::kw_while, 332 if (TheLine->First->is(tok::l_brace) && TheLine->First == TheLine->Last && 332 if (TheLine->First->is(tok::l_brace) && TheLine->First == TheLine->Last && 334 I[-1]->First->isOneOf(tok::kw_if, tok::kw_while, tok::kw_for)) { 346 if (TheLine->First->is(tok::l_brace) && I != AnnotatedLines.begin() && 347 I[-1]->First->is(tok::at) && I[-1]->First->Next) { 347 I[-1]->First->is(tok::at) && I[-1]->First->Next) { 348 tok::ObjCKeywordKind kwId = I[-1]->First->Next->Tok.getObjCKeywordID(); 354 if (TheLine->First->is(tok::l_brace) && I != AnnotatedLines.begin() && 355 I[-1]->First->isOneOf(tok::kw_case, tok::kw_default)) 360 (I[1]->First->is(tok::r_brace) && 366 if (I[1]->First->is(TT_FunctionLBrace) && 379 I[1]->First == I[1]->Last && I + 2 != E && 380 I[2]->First->is(tok::r_brace))) { 389 if (TheLine->First->is(tok::kw_if)) { 394 if (TheLine->First->isOneOf(tok::kw_for, tok::kw_while)) { 399 if (TheLine->First->isOneOf(tok::kw_case, tok::kw_default)) { 405 (TheLine->First->HasUnescapedNewline || TheLine->First->IsFirst)) { 405 (TheLine->First->HasUnescapedNewline || TheLine->First->IsFirst)) { 417 if (I + 2 != E && I[2]->InPPDirective && !I[2]->First->HasUnescapedNewline) 431 I[1]->First->is(tok::l_brace) && 435 (I[1]->InPPDirective && I[1]->First->HasUnescapedNewline)) 443 if (I[1]->First->isOneOf(tok::semi, tok::kw_if, tok::kw_for, tok::kw_while, 449 I[2]->First->is(tok::kw_else)) 460 I[1]->First->isOneOf(tok::kw_case, tok::kw_default)) 462 if (I[0]->Last->is(tok::l_brace) || I[1]->First->is(tok::l_brace)) 475 if (Line->First->isOneOf(tok::kw_case, tok::kw_default, tok::r_brace)) 477 if (Line->First->isOneOf(tok::kw_if, tok::kw_for, tok::kw_switch, 481 if (Line->First->is(tok::comment)) { 489 if (Line->First->isOneOf(tok::kw_case, tok::kw_default, tok::r_brace)) 491 if (Line->First->isNot(tok::comment) || Level != Line->Level) 515 Line.First->isOneOf(tok::at, tok::minus, tok::plus)) 520 if (Line.First->isOneOf(tok::kw_else, tok::kw_case) || 521 (Line.First->Next && Line.First->Next->is(tok::kw_else))) 521 (Line.First->Next && Line.First->Next->is(tok::kw_else))) 524 if (Line.First->is(tok::kw_default)) { 525 const FormatToken *Tok = Line.First->getNextNonComment(); 529 if (Line.First->isOneOf(tok::kw_if, tok::kw_while, tok::kw_do, tok::kw_try, 539 !I[1]->First->is(tok::r_brace)) 545 I + 2 != E && !I[2]->First->is(tok::r_brace)) 548 Line.First->isOneOf(tok::kw_while, tok::kw_do, tok::kw_for) && 550 !I[1]->First->is(tok::r_brace)) 553 Line.First->isOneOf(tok::kw_while, tok::kw_do, tok::kw_for) && 556 I + 2 != E && !I[2]->First->is(tok::r_brace)) 563 if (Line.First->isOneOf(tok::kw_try, tok::kw___try, tok::kw_catch, 569 FormatToken *Tok = I[1]->First; 580 FormatToken *RecordTok = Line.First; 611 Tok = I[2]->First; 625 if (Line.First == Line.Last && 632 } else if (I[1]->First->is(tok::l_brace)) { 642 (I[1]->First == I[1]->Last && I + 2 != E && 643 I[2]->First->is(tok::r_brace))) { 662 !I[1]->First->HasUnescapedNewline && !I[1]->First->is(tok::eof)) { 662 !I[1]->First->HasUnescapedNewline && !I[1]->First->is(tok::eof)) { 670 if (I[1]->First->MustBreakBefore || I[2]->First->MustBreakBefore) 670 if (I[1]->First->MustBreakBefore || I[2]->First->MustBreakBefore) 676 for (const FormatToken *Tok = Line->First; Tok; Tok = Tok->Next) { 685 assert(!B.First->Previous); 688 A.Last->Next = B.First; 689 B.First->Previous = A.Last; 690 B.First->CanBreakBefore = true; 691 unsigned LengthA = A.Last->TotalLength + B.First->SpacesRequiredBefore; 692 for (FormatToken *Tok = B.First; Tok; Tok = Tok->Next) { 710 markFinalized(Child->First); 782 if (Previous.Children[0]->First->MustBreakBefore) 806 *Child->First, /*Newlines=*/0, /*Spaces=*/1, 1096 Indent != TheLine.First->OriginalColumn; 1103 SourceMgr.getSpellingLineNumber(TheLine.First->Tok.getLocation()); 1108 bool LastLine = Line->First->is(tok::eof); 1139 for (const FormatToken *Tok = TheLine.First; Tok; Tok = Tok->Next) 1146 TheLine.First->NewlinesBefore > 0 || TheLine.First->IsFirst; 1146 TheLine.First->NewlinesBefore > 0 || TheLine.First->IsFirst; 1156 TheLine.First->OriginalColumn, 1157 TheLine.First->OriginalColumn); 1159 Whitespaces->addUntouchableToken(*TheLine.First, 1163 for (FormatToken *Tok = TheLine.First->Next; Tok; Tok = Tok->Next) 1170 markFinalized(TheLine.First); 1181 FormatToken &RootToken = *Line.First; 1219 if (PreviousLine && PreviousLine->First->isAccessSpecifier() && 1256 !NextLine->First->HasUnescapedNewline));tools/clang/lib/Format/UsingDeclarationsSorter.cpp
142 (*UsingDeclarations)[I].Line->First->WhitespaceRange.getBegin(); 154 auto Begin = (*UsingDeclarations)[I].Line->First->Tok.getLocation(); 157 SortedUsingDeclarations[I].Line->First->Tok.getLocation(); 192 const auto *FirstTok = AnnotatedLines[I]->First;