mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
`SemaAnnotator` always attempts to retrieve the location of the decl. This requires generating the USR, which needs to resolve the type. But that's invalid in the presence of `@_implementationOnly`. This most commonly comes up during index while building as even though it skip internal decls, by that point it's too late (`SemaAnnotator` has already tried retrieving the location). Other uses of `SourceEntityWalker` should be unaffected as they only run over the current decls in the current module. For now skip walking internal top level decls from serialized modules in `SemaAnnotator`. Consider expanding this to most, if not all, `ASTWalker` clients in the future - it's unlikely `SemaAnnotator` is the only one with this problem. Resolves rdar://91279771.
30 KiB
30 KiB