Files
swift-mirror/test/SourceKit/CursorInfo/at_eof.swift
Alex Hoppen 6fcfe7fe28 [CursorInfo] Don’t crash if we are performing cursor info at EOF
When performing code completion at the end of a file, the IDE inspection target would point to the null byte terminating the end of the string. That would cause us to consider this null byte as a code completion marker. When continuing to scan for the actual EOF, we would walk past the end of the buffer.

Simply don’t consider the last null byte as a candidate for the code completion marker to fix the problem.
2023-04-24 15:24:59 -07:00

2 lines
55 B
Swift

// RUN: %sourcekitd-test -req=cursor -pos=2:1 %s -- %s