Lines Matching refs:T2
59 SyntaxTree::Impl &T1, &T2; member in clang::diff::ASTDiff::Impl
62 Impl(SyntaxTree::Impl &T1, SyntaxTree::Impl &T2,
75 assert(&*Tree == &T2 && "Invalid tree."); in getMapped()
567 const SyntaxTree::Impl &T2, NodeId Id1, NodeId Id2) in ZhangShashaMatcher() argument
568 : DiffImpl(DiffImpl), S1(T1, Id1), S2(T2, Id2) { in ZhangShashaMatcher()
761 const Node &N2 = T2.getNode(Id2); in identical()
764 T1.getNodeValue(Id1) != T2.getNodeValue(Id2)) in identical()
773 return Options.isMatchingAllowed(T1.getNode(Id1), T2.getNode(Id2)); in isMatchingPossible()
779 NodeId P2 = T2.getNode(Id2).Parent; in haveSameParents()
786 if (std::max(T1.getNumberOfDescendants(Id1), T2.getNumberOfDescendants(Id2)) > in addOptimalMapping()
789 ZhangShashaMatcher Matcher(*this, T1, T2, Id1, Id2); in addOptimalMapping()
806 CommonDescendants += int(Dst.isValid() && T2.isInSubtree(Dst, Id2)); in getJaccardSimilarity()
810 T2.getNumberOfDescendants(Id2) - 1 - CommonDescendants; in getJaccardSimilarity()
821 for (NodeId Id2 : T2) { in findCandidate()
839 !M.hasDst(T2.getRootId())) { in matchBottomUp()
840 if (isMatchingPossible(T1.getRootId(), T2.getRootId())) { in matchBottomUp()
841 M.link(T1.getRootId(), T2.getRootId()); in matchBottomUp()
842 addOptimalMapping(M, T1.getRootId(), T2.getRootId()); in matchBottomUp()
862 PriorityList L2(T2); in matchTopDown()
864 Mapping M(T1.getSize() + T2.getSize()); in matchTopDown()
867 L2.push(T2.getRootId()); in matchTopDown()
905 ASTDiff::Impl::Impl(SyntaxTree::Impl &T1, SyntaxTree::Impl &T2, in Impl() argument
907 : T1(T1), T2(T2), Options(Options) { in Impl()
926 for (NodeId Id2 : T2) { in computeChangeKinds()
928 T2.getMutableNode(Id2).Change = Insert; in computeChangeKinds()
929 T2.getMutableNode(Id2).Shift -= 1; in computeChangeKinds()
938 T2.findPositionInParent(Id2, true)) { in computeChangeKinds()
940 T2.getMutableNode(Id2).Shift -= 1; in computeChangeKinds()
943 for (NodeId Id2 : T2.NodesBfs) { in computeChangeKinds()
948 Node &N2 = T2.getMutableNode(Id2); in computeChangeKinds()
953 T2.findPositionInParent(Id2, true)) { in computeChangeKinds()
956 if (T1.getNodeValue(Id1) != T2.getNodeValue(Id2)) { in computeChangeKinds()
962 ASTDiff::ASTDiff(SyntaxTree &T1, SyntaxTree &T2, in ASTDiff() argument
964 : DiffImpl(llvm::make_unique<Impl>(*T1.TreeImpl, *T2.TreeImpl, Options)) {} in ASTDiff()