mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
`SemaAnnotator` walks the tree in source order with respect to the source ranges *excluding* attributes, but `RangeResolver` considers attributes part of their declaration. Thus they disagree on what “walking in source order means”. `SemaAnnotator` will visit the attributes *before* the decl they are on, while `RangeResolver` as currently implemented expects them *as part of* the decl they are on. Thus, for the purpose of `RangeResolver`, we need to assume that nodes are visited in arbitrary order and we might encounter enclosing nodes after their children. Thus, when we find a new node, remove all nodes that it encloses from `ContainedASTNodes`. Fixes rdar://64140713 [SR-12958]
7.2 KiB
7.2 KiB