[DomTree] Fix root attachment in runDFS() (#73148)
Currently, runDFS() only sets the Parent of the DFS root if it is already in the NodeToInfo map. This doesn't matter if we're running DFS on the DT root, which doesn't have a parent anyway. However, when running on PDT roots, this means we end up keeping the parent at 0, rather than setting it to 1 for the virtual PDT root. Because the virtual root (nullptr) has the same value as the dummy value in NumToNode (nullptr) this happens to work out by accident right now. I believe we should always be setting the parent in runDFS(), and adjust AttachToNum in doFullDFSWalk() to be 1 (the virtual root) for PDTs.
Loading
Please sign in to comment