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 b78b6b9 + ee3bcf2 commit 02ad286Copy full SHA for 02ad286
lib/AST/Module.cpp
@@ -640,7 +640,7 @@ SourceFile *ModuleDecl::getSourceFileContainingLocation(SourceLoc loc) {
640
641
auto foundSourceFile = *found;
642
auto foundRange = sourceMgr.getRangeForBuffer(*foundSourceFile->getBufferID());
643
- if (!foundRange.contains(adjustedLoc))
+ if (!foundRange.contains(adjustedLoc) && adjustedLoc != foundRange.getStart())
644
return nullptr;
645
646
// Update the last source file.
0 commit comments