RequestResult class and Pass*InfoForDecl fixes

This commit is contained in:
David Goldman
2019-05-03 15:17:40 -04:00
parent a3a4d2d22b
commit 00d771ca6b
10 changed files with 352 additions and 285 deletions

View File

@@ -148,8 +148,14 @@ public:
TestCursorInfo TestInfo;
getLang().getCursorInfo(DocName, Offset, 0, false, false, Args,
[&](const CursorInfoData &Info, StringRef Error) {
TestInfo.Error = Error;
[&](const RequestResult<CursorInfoData> &Result) {
assert(!Result.isCancelled());
if (Result.isError()) {
TestInfo.Error = Result.getError();
sema.signal();
return;
}
const CursorInfoData &Info = Result.value();
TestInfo.Name = Info.Name;
TestInfo.Typename = Info.TypeName;
TestInfo.Filename = Info.Filename;