reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

tools/clang/lib/Format/UnwrappedLineParser.cpp
  145     else if (!Parser.Line->Tokens.empty())
  146       Parser.CurrentLines = &Parser.Line->Tokens.back().Children;
  147     PreBlockLine = std::move(Parser.Line);
  148     Parser.Line = std::make_unique<UnwrappedLine>();
  149     Parser.Line->Level = PreBlockLine->Level;
  150     Parser.Line->InPPDirective = PreBlockLine->InPPDirective;
  154     if (!Parser.Line->Tokens.empty()) {
  157     assert(Parser.Line->Tokens.empty());
  158     Parser.Line = std::move(PreBlockLine);
  244   Line.reset(new UnwrappedLine);
  252   Line->FirstStartColumn = FirstStartColumn;
  257   Line->FirstStartColumn = FirstStartColumn;
  302       !Line->InPPDirective && Style.Language != FormatStyle::LK_JavaScript;
  303   ScopedDeclarationState DeclarationState(*Line, DeclarationScopeStack,
  373           Line->MustBeDeclaration) {
  379           (Style.IndentCaseLabels || (Line->InPPDirective && Line->Level == 1)))
  379           (Style.IndentCaseLabels || (Line->InPPDirective && Line->Level == 1)))
  380         ++Line->Level;
  542   unsigned InitialLevel = Line->Level;
  556   ScopedDeclarationState DeclarationState(*Line, DeclarationScopeStack,
  559     ++Line->Level;
  567     Line->Level = InitialLevel;
  582   Line->Level = InitialLevel;
  585     Line->MatchingOpeningBlockLineIndex = OpeningLineIndex;
  648                        (isGoogScope(*Line) || isIIFE(*Line, Keywords)));
  648                        (isGoogScope(*Line) || isIIFE(*Line, Keywords)));
  650     ScopedDeclarationState DeclarationState(*Line, DeclarationScopeStack,
  652     Line->Level += SkipIndent ? 0 : 1;
  655     Line->Level -= SkipIndent ? 0 : 1;
  662   ScopedMacroState MacroState(*Line, Tokens, FormatTok);
  833     Line->Level += PPBranchLevel + 1;
  835   ++Line->Level;
  850     Line->Level += PPBranchLevel + 1;
  951     bool HasAt = std::find_if(Line->Tokens.begin(), Line->Tokens.end(),
  951     bool HasAt = std::find_if(Line->Tokens.begin(), Line->Tokens.end(),
  954                               }) != Line->Tokens.end();
 1024     if (Style.Language == FormatStyle::LK_JavaScript && Line->MustBeDeclaration)
 1030     if (Style.Language == FormatStyle::LK_JavaScript && Line->MustBeDeclaration)
 1041     if (Style.Language == FormatStyle::LK_JavaScript && Line->MustBeDeclaration)
 1308       size_t TokenCount = Line->Tokens.size();
 1311           (TokenCount > 1 || (TokenCount == 1 && !Line->Tokens.front().Tok->is(
 1351       TokenCount = Line->Tokens.size();
 1353           (TokenCount == 2 && Line->Tokens.front().Tok->is(tok::comment))) {
 1354         if (FormatTok->Tok.is(tok::colon) && !Line->MustBeDeclaration) {
 1355           Line->Tokens.begin()->Tok->MustBreakBefore = true;
 1773     CompoundStatementIndenter Indenter(this, Style, Line->Level);
 1781     ++Line->Level;
 1783     --Line->Level;
 1788       CompoundStatementIndenter Indenter(this, Style, Line->Level);
 1795       ++Line->Level;
 1799       --Line->Level;
 1826     CompoundStatementIndenter Indenter(this, Style, Line->Level);
 1838     ++Line->Level;
 1840     --Line->Level;
 1864     CompoundStatementIndenter Indenter(this, Style, Line->Level);
 1945     CompoundStatementIndenter Indenter(this, Style, Line->Level);
 1950     ++Line->Level;
 1952     --Line->Level;
 1960     CompoundStatementIndenter Indenter(this, Style, Line->Level);
 1966     ++Line->Level;
 1968     --Line->Level;
 1983   unsigned OldLineLevel = Line->Level;
 1984   if (Line->Level > 1 || (!Line->InPPDirective && Line->Level > 0))
 1984   if (Line->Level > 1 || (!Line->InPPDirective && Line->Level > 0))
 1984   if (Line->Level > 1 || (!Line->InPPDirective && Line->Level > 0))
 1985     --Line->Level;
 1987     Line->Level = 0;
 1989     CompoundStatementIndenter Indenter(this, Line->Level,
 2005   Line->Level = OldLineLevel;
 2027     CompoundStatementIndenter Indenter(this, Style, Line->Level);
 2032     ++Line->Level;
 2034     --Line->Level;
 2146   ++Line->Level;
 2174   --Line->Level;
 2421     if (Line->Tokens.empty()) {
 2472   if (Line->Tokens.empty())
 2476       printDebugInfo(*Line);
 2478   CurrentLines->push_back(std::move(*Line));
 2479   Line->Tokens.clear();
 2480   Line->MatchingOpeningBlockLineIndex = UnwrappedLine::kInvalidIndex;
 2481   Line->FirstStartColumn = 0;
 2495   return (Line->InPPDirective || FormatTok.HasUnescapedNewline) &&
 2607   bool JustComments = Line->Tokens.empty();
 2621         continuesLineCommentSection(**I, *Line, CommentPragmasRegex);
 2685           continuesLineCommentSection(*FormatTok, *Line, CommentPragmasRegex);
 2704     while (!Line->InPPDirective && FormatTok->Tok.is(tok::hash) &&
 2710       bool SwitchToPreprocessorLines = !Line->Tokens.empty();
 2713               static_cast<unsigned>(-LevelDifference) <= Line->Level) &&
 2715       Line->Level += LevelDifference;
 2721         Line->Level += PPBranchLevel;
 2740         !Line->InPPDirective) {
 2758   Line->Tokens.push_back(UnwrappedLineNode(Tok));
 2760     Line->Tokens.back().Tok->MustBreakBefore = true;