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.
1 parent 45a0979 commit ee3bcf2Copy full SHA for ee3bcf2
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