llvm-project
08391d2b - [clangd] Do not skip Attr nodes in SelectionTree traversal (#174199)

Commit
130 days ago
[clangd] Do not skip Attr nodes in SelectionTree traversal (#174199) SelectionTree attempts to skip nodes that don't intersect with the selection for performance. However, Attr nodes (like AlignedAttr) often have inaccurate source ranges (e.g. pointing to a single location). Previously, canSafelySkipNode handled nodes that *have* attributes attached, but failed to account for the case where the node being visited *is* the attribute itself. This caused `alignas(WALDO)` to be skipped, breaking features like go-to-definition on WALDO. This commit adds a check to ensure explicit Attr nodes are visited, fixing the issue. Fixes https://github.com/clangd/clangd/issues/2502
Author
Parents
Loading