Merge pull request #36994 from ahoppen/pr/refactor-protocol-requirement-async

[Refactoring] Fix crash when refactoring protocol requirement to async
This commit is contained in:
Alex Hoppen
2021-04-22 17:02:44 +02:00
committed by GitHub
2 changed files with 8 additions and 2 deletions

View File

@@ -4906,7 +4906,7 @@ private:
RightStartLoc = Lexer::getLocForEndOfToken(SM, FD->getThrowsLoc());
}
SourceLoc RightEndLoc =
FD->getBody() ? FD->getBody()->getLBraceLoc() : FD->getEndLoc();
FD->getBody() ? FD->getBody()->getLBraceLoc() : RightStartLoc;
addRange(RightStartLoc, RightEndLoc);
return;
}