File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -5892,22 +5892,25 @@ ObjCSelector DestructorDecl::getObjCSelector() const {
5892
5892
5893
5893
SourceRange FuncDecl::getSourceRange () const {
5894
5894
SourceLoc StartLoc = getStartLoc ();
5895
- if (StartLoc. isInvalid () ||
5896
- getBodyKind () == BodyKind::Synthesize )
5895
+
5896
+ if (StartLoc. isInvalid () )
5897
5897
return SourceRange ();
5898
5898
5899
5899
if (getBodyKind () == BodyKind::Unparsed ||
5900
5900
getBodyKind () == BodyKind::Skipped)
5901
5901
return { StartLoc, BodyRange.End };
5902
5902
5903
- if (auto *B = getBody ()) {
5903
+ if (auto *B = getBody (/* canSynthesize= */ false )) {
5904
5904
if (!B->isImplicit ())
5905
5905
return { StartLoc, B->getEndLoc () };
5906
5906
}
5907
5907
5908
5908
if (isa<AccessorDecl>(this ))
5909
5909
return StartLoc;
5910
5910
5911
+ if (getBodyKind () == BodyKind::Synthesize)
5912
+ return SourceRange ();
5913
+
5911
5914
auto TrailingWhereClauseSourceRange = getGenericTrailingWhereClauseSourceRange ();
5912
5915
if (TrailingWhereClauseSourceRange.isValid ())
5913
5916
return { StartLoc, TrailingWhereClauseSourceRange.End };
You can’t perform that action at this time.
0 commit comments