Skip to content

Commit 0814849

Browse files
authored
Merge pull request #68982 from DougGregor/faster-find-buffer-containing-loc-docfix
2 parents e01f234 + e9e958b commit 0814849

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Basic/SourceLoc.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,8 @@ SourceManager::findBufferContainingLocInternal(SourceLoc Loc) const {
512512
Loc,
513513
BufferIDRangeComparison{this});
514514

515-
// If we didn't find
515+
// If the location was past the range covered by source buffers or
516+
// is not within any of the source buffers, fail.
516517
if (found == LocCache.sortedBuffers.end() || !isInBuffer(*found))
517518
return llvm::None;
518519

0 commit comments

Comments
 (0)