Skip to content

Commit 5633a31

Browse files
authored
Update PluginHost.swift
1 parent 99b2391 commit 5633a31

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/ASTGen/Sources/ASTGen/PluginHost.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ class PluginDiagnosticsEngine {
277277
SwiftDiagnostic_create(
278278
cxxDiagnosticEngine, bridgedSeverity,
279279
cxxSourceLocation(at: position),
280-
messageBuffer.baseAddress, messageBuffer.count)
280+
messageBuffer.baseAddress, SwiftInt(messageBuffer.count))
281281
}
282282

283283
// Emit highlights
@@ -296,7 +296,7 @@ class PluginDiagnosticsEngine {
296296
var newText = change.newText
297297
newText.withUTF8 { textBuffer in
298298
SwiftDiagnostic_fixItReplace(
299-
diag, startLoc, endLoc, textBuffer.baseAddress, textBuffer.count)
299+
diag, startLoc, endLoc, textBuffer.baseAddress, SwiftInt(textBuffer.count))
300300
}
301301
}
302302

@@ -343,7 +343,7 @@ class PluginDiagnosticsEngine {
343343
else {
344344
return nil
345345
}
346-
return bufferBaseAddress.advanced(by: SwiftInt(offset))
346+
return bufferBaseAddress.advanced(by: offset)
347347
}
348348

349349
/// C++ source location from a position value from a plugin.

0 commit comments

Comments
 (0)