mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
c763ab5d1e fixed an issue in
`getSerializedLocs` where it never actually cached its result (and thus
always allocated a new `CachedExternalSourceLocs`). Unfortunately it
missed a leak that could occur when `DocRanges` grows beyond its initial
size of 4.
Allocate `DocRanges` upfront in the `ASTContext` as well in order to
prevent this leak.
Resolves rdar://85472403.
3.7 KiB
3.7 KiB