[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:
Argyrios Kyrtzidis
2014-04-23 00:24:11 +00:00
parent ff4da1bff9
commit 2db90e9105
3 changed files with 12 additions and 3 deletions

View File

@@ -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);
}