[SourceKit] Teach range-info request to recognize single declaration and multi-statements. (#5672)

This commit is contained in:
Xi Ge
2016-11-07 16:54:48 -08:00
committed by GitHub
parent ed1156b751
commit d6f8f142a7
5 changed files with 156 additions and 36 deletions

View File

@@ -1097,7 +1097,7 @@ static void resolveRange(SwiftLangSupport &Lang,
Result.RangeKind = Lang.getUIDForRangeKind(Info.Kind);
Result.RangeContent = Info.Content;
switch (Info.Kind) {
case RangeKind::Expression: {
case RangeKind::SingleExpression: {
SmallString<64> SS;
llvm::raw_svector_ostream OS(SS);
Info.Ty.print(OS);
@@ -1105,6 +1105,8 @@ static void resolveRange(SwiftLangSupport &Lang,
Receiver(Result);
return;
}
case RangeKind::SingleDecl:
case RangeKind::MultiStatement:
case RangeKind::SingleStatement: {
Receiver(Result);
return;