mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[IDE] Honor #sourceLocation in comment-to-XML conversion
This commit is contained in:
@@ -317,8 +317,7 @@ void CommentToXMLConverter::visitDocComment(const DocComment *DC) {
|
||||
auto Loc = D->getLoc();
|
||||
if (Loc.isValid()) {
|
||||
const auto &SM = D->getASTContext().SourceMgr;
|
||||
unsigned BufferID = SM.findBufferContainingLoc(Loc);
|
||||
StringRef FileName = SM.getIdentifierForBuffer(BufferID);
|
||||
StringRef FileName = SM.getDisplayNameForLoc(Loc);
|
||||
auto LineAndColumn = SM.getLineAndColumn(Loc);
|
||||
OS << " file=\"";
|
||||
appendWithXMLEscaping(OS, FileName);
|
||||
|
||||
Reference in New Issue
Block a user