Merge pull request #19054 from jrose-apple/nocturnal

Honor #sourceLocation filenames in several more places
This commit is contained in:
Jordan Rose
2018-08-30 13:02:50 -07:00
committed by GitHub
17 changed files with 148 additions and 51 deletions

View File

@@ -684,8 +684,7 @@ getParamParentNameOffset(const ValueDecl *VD, SourceLoc Cursor) {
if (Loc.isInvalid())
return None;
auto &SM = VD->getASTContext().SourceMgr;
return SM.getLocOffsetInBuffer(Loc, SM.getIDForBufferIdentifier(SM.
getBufferIdentifierForLoc(Loc)).getValue());
return SM.getLocOffsetInBuffer(Loc, SM.findBufferContainingLoc(Loc));
}
/// Returns true for failure to resolve.