Files
swift-mirror/test/SourceKit/ConformingMethods/ifconfigcrash.swift
Doug Gregor 6a310074c4 Ensure that the source buffer passed to #if evaluation contains the condition
The implementation of `#if` configuration evaluation assumed that the
SourceFile instance within the `Parser` contained all of the source ranges
for code parsed within that `Parser` instance. This is not always the case,
so avoid using the SourceFile directly and instead use the source buffer
that directly contains the condition.

Fixes https://github.com/swiftlang/swift/issues/76137. Big thank you
to Alex Hoppen and the stress tester for finding this.
2024-08-29 14:31:48 -07:00

154 B