File tree Expand file tree Collapse file tree 1 file changed +6
-16
lines changed Expand file tree Collapse file tree 1 file changed +6
-16
lines changed Original file line number Diff line number Diff line change @@ -10308,30 +10308,20 @@ SourceRange AbstractFunctionDecl::getSignatureSourceRange() const {
10308
10308
if (isImplicit ())
10309
10309
return SourceRange ();
10310
10310
10311
- SourceLoc endLoc;
10312
-
10313
- // name(parameter list...) async throws(E)
10311
+ SourceRange thrownTypeRange;
10314
10312
if (auto *typeRepr = getThrownTypeRepr ())
10315
- endLoc = typeRepr->getSourceRange ().End ;
10316
- if (endLoc.isInvalid ())
10317
- endLoc = getThrowsLoc ();
10318
- if (endLoc.isInvalid ())
10319
- endLoc = getAsyncLoc ();
10313
+ thrownTypeRange = typeRepr->getSourceRange ();
10320
10314
10321
- if (endLoc. isInvalid () )
10322
- return getParameterListSourceRange ();
10323
- return SourceRange ( getNameLoc ( ), endLoc );
10315
+ // name(parameter list...) async throws(E )
10316
+ return SourceRange::combine ( getParameterListSourceRange (), getAsyncLoc (),
10317
+ getThrowsLoc ( ), thrownTypeRange );
10324
10318
}
10325
10319
10326
10320
SourceRange AbstractFunctionDecl::getParameterListSourceRange () const {
10327
10321
if (isImplicit ())
10328
10322
return SourceRange ();
10329
10323
10330
- auto endLoc = getParameters ()->getSourceRange ().End ;
10331
- if (endLoc.isInvalid ())
10332
- return getNameLoc ();
10333
-
10334
- return SourceRange (getNameLoc (), endLoc);
10324
+ return SourceRange::combine (getNameLoc (), getParameters ()->getSourceRange ());
10335
10325
}
10336
10326
10337
10327
std::optional<Fingerprint> AbstractFunctionDecl::getBodyFingerprint () const {
You can’t perform that action at this time.
0 commit comments