mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
sourcekitd: define a new custom buffer for expression type response.
This custom buffer encapsulates the memory layout details of the response
for the expression type request. From the client side, each expression type
is represented as a tuple of {expr_offset, expr_length, printed_type}.
rdar://35199889
This commit is contained in:
@@ -2057,8 +2057,7 @@ void SwiftLangSupport::collectExpressionTypes(StringRef FileName,
|
||||
llvm::raw_svector_ostream OS(TypeBuffer);
|
||||
ExpressionTypesInFile Result;
|
||||
for (auto Item: collectExpressionType(*SF, Scratch, OS)) {
|
||||
Result.Results.push_back({Item.offset, Item.length, Item.typeOffset,
|
||||
Item.typeLength});
|
||||
Result.Results.push_back({Item.offset, Item.length, Item.typeOffset});
|
||||
}
|
||||
Result.TypeBuffer = OS.str();
|
||||
Receiver(Result);
|
||||
|
||||
Reference in New Issue
Block a user