Lines Matching full:children

291     std::vector<SymBuilder> Children;
292 DocumentSymbol Symbol; // Symbol.children is empty, use Children instead.
294 // (Thus we will never create further children for these expansions).
299 for (SymBuilder &C : Children) {
300 Symbol.children.push_back(std::move(C).build());
301 // Expand range to ensure children nest properly, which editors expect.
306 std::min(Symbol.range.start, Symbol.children.back().range.start);
308 std::max(Symbol.range.end, Symbol.children.back().range.end);
315 Children.emplace_back();
316 Children.back().EnclosingMacroLoc = EnclosingMacroLoc;
317 Children.back().Symbol = std::move(S);
318 return Children.back();
321 // Get an appropriate container for children of this symbol that were
332 if (!Children.empty() && !Children.back().EnclosingMacroLoc.empty() &&
333 Children.back().EnclosingMacroLoc.back() == Tok.location())
334 return Children.back();
377 return std::move(std::move(Root).build().children);
488 // Only visit the function itself, do not visit the children (i.e.
495 // children.
499 // Visit both the decl and its children, both are written in the code.
514 // For all other cases, visit both the children and the decl.
536 for (auto &C : Cur->children) {
538 // a single line, and children have disjoint ranges).
545 // Cur is the parent of P since none of the children contain P.
551 Cur->children.emplace_back(std::move(P.DocSym));
556 // parent's children which occur after P.
558 // of the parent's children, we temporarily skip over it and look at
560 // - Otherwise nest all of its parent's children which occur after P but
570 if (llvm::any_of(Cur->children, [&NextPragma](const auto &Child) {
575 // Pragma owns all the children between P and NextPragma
576 auto It = llvm::partition(Cur->children,
581 P.DocSym.children.assign(make_move_iterator(It),
582 make_move_iterator(Cur->children.end()));
583 Cur->children.erase(It, Cur->children.end());
589 // children after P.
590 auto It = llvm::partition(Cur->children, [&P](const auto &S) -> bool {
593 P.DocSym.children.assign(make_move_iterator(It),
594 make_move_iterator(Cur->children.end()));
595 Cur->children.erase(It, Cur->children.end());
597 // Update the range for P to cover children and append to Cur.
598 for (DocumentSymbol &Sym : P.DocSym.children)
600 Cur->children.emplace_back(std::move(P.DocSym));
644 Root.children = std::move(Syms);
647 return Root.children;