mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[IDE] For the syntax node of functions, set the name range to the range of the function signature.
Swift SVN r16680
This commit is contained in:
@@ -318,9 +318,8 @@ bool ModelASTWalker::walkToDeclPre(Decl *D) {
|
||||
SN.Range = charSourceRangeFromSourceRange(SM, AFD->getSourceRange());
|
||||
SN.BodyRange = innerCharSourceRangeFromSourceRange(SM,
|
||||
AFD->getBodySourceRange());
|
||||
SourceLoc NRStart = AFD->getNameLoc();
|
||||
SourceLoc NREnd = NRStart.getAdvancedLoc(AFD->getName().getLength());
|
||||
SN.NameRange = CharSourceRange(SM, NRStart, NREnd);
|
||||
SN.NameRange = charSourceRangeFromSourceRange(SM,
|
||||
AFD->getSignatureSourceRange());
|
||||
SN.Attrs = AFD->getAttrs();
|
||||
pushStructureNode(SN);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user