• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/llvm-project/clang/lib/Tooling/ASTDiff/

Lines Matching defs:Id

72                    NodeId Id) const {
74 return TheMapping.getDst(Id);
76 return TheMapping.getSrc(Id);
144 const Node &getNode(NodeId Id) const { return Nodes[Id]; }
145 Node &getMutableNode(NodeId Id) { return Nodes[Id]; }
146 bool isValidNodeId(NodeId Id) const { return Id >= 0 && Id < getSize(); }
148 int getNumberOfDescendants(NodeId Id) const;
149 bool isInSubtree(NodeId Id, NodeId SubtreeRoot) const;
150 int findPositionInParent(NodeId Id, bool Shifted = false) const;
156 std::string getNodeValue(NodeId Id) const;
191 int Id = 0, Depth = 0;
198 NodeId MyId = Id;
211 ++Id;
222 N.RightMostDescendant = Id - 1;
284 std::function<void(NodeId)> Traverse = [&](NodeId Id) {
285 const Node &N = Tree.getNode(Id);
288 Postorder.push_back(Id);
309 std::function<void(NodeId)> PostorderTraverse = [&](NodeId Id) {
310 for (NodeId Child : getNode(Id).Children)
312 PostorderIds[Id] = PostorderId;
331 int SyntaxTree::Impl::getNumberOfDescendants(NodeId Id) const {
332 return getNode(Id).RightMostDescendant - Id + 1;
335 bool SyntaxTree::Impl::isInSubtree(NodeId Id, NodeId SubtreeRoot) const {
336 return Id >= SubtreeRoot && Id <= getNode(SubtreeRoot).RightMostDescendant;
339 int SyntaxTree::Impl::findPositionInParent(NodeId Id, bool Shifted) const {
340 NodeId Parent = getNode(Id).Parent;
348 if (Siblings[I] == Id) {
409 std::string SyntaxTree::Impl::getNodeValue(NodeId Id) const {
410 return getNodeValue(getNode(Id));
475 int Id = 0;
477 explicit SNodeId(int Id) : Id(Id) {}
480 operator int() const { return Id; }
481 SNodeId &operator++() { return ++Id, *this; }
482 SNodeId &operator--() { return --Id, *this; }
483 SNodeId operator+(int Other) const { return SNodeId(Id + Other); }
504 NodeId getIdInRoot(SNodeId Id) const {
505 assert(Id > 0 && Id <= getSize() && "Invalid subtree node index.");
506 return RootIds[Id - 1];
508 const Node &getNode(SNodeId Id) const {
509 return Tree.getNode(getIdInRoot(Id));
511 SNodeId getLeftMostDescendant(SNodeId Id) const {
512 assert(Id > 0 && Id <= getSize() && "Invalid subtree node index.");
513 return LeftMostDescendants[Id - 1];
519 std::string getNodeValue(SNodeId Id) const {
520 return Tree.getNodeValue(getIdInRoot(Id));
750 void open(NodeId Id) {
751 for (NodeId Child : Tree.getNode(Id).Children)
764 for (size_t Id = 0, E = N1.Children.size(); Id < E; ++Id)
765 if (!identical(N1.Children[Id], N2.Children[Id]))
871 for (NodeId Id : L1.pop())
872 L1.open(Id);
876 for (NodeId Id : L2.pop())
877 L2.open(Id);
966 NodeId ASTDiff::getMapped(const SyntaxTree &SourceTree, NodeId Id) const {
967 return DiffImpl->getMapped(SourceTree.TreeImpl, Id);
978 const Node &SyntaxTree::getNode(NodeId Id) const {
979 return TreeImpl->getNode(Id);
989 int SyntaxTree::findPositionInParent(NodeId Id) const {
990 return TreeImpl->findPositionInParent(Id);
1009 std::string SyntaxTree::getNodeValue(NodeId Id) const {
1010 return TreeImpl->getNodeValue(Id);