We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d5005f8 + a3d59b3 commit bd3a755Copy full SHA for bd3a755
lib/ASTGen/Sources/ASTGen/Bridge.swift
@@ -20,12 +20,8 @@ extension BridgedSourceLoc {
20
at position: AbsolutePosition,
21
in buffer: UnsafeBufferPointer<UInt8>
22
) {
23
- if let start = buffer.baseAddress,
24
- position.utf8Offset >= 0 && position.utf8Offset < buffer.count {
25
- self = SourceLoc_advanced(BridgedSourceLoc(raw: start), SwiftInt(position.utf8Offset))
26
- } else {
27
- self = nil
28
- }
+ precondition(position.utf8Offset >= 0 && position.utf8Offset < buffer.count)
+ self = SourceLoc_advanced(BridgedSourceLoc(raw: buffer.baseAddress!), SwiftInt(position.utf8Offset))
29
}
30
31
0 commit comments