We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b56bb3d commit e986a15Copy full SHA for e986a15
lib/AST/Decl.cpp
@@ -4583,9 +4583,12 @@ SourceRange FuncDecl::getSourceRange() const {
4583
if (!B->isImplicit())
4584
return { StartLoc, B->getEndLoc() };
4585
}
4586
+
4587
+ if (this->isAccessor())
4588
+ return StartLoc;
4589
4590
if (getBodyResultTypeLoc().hasLocation() &&
- getBodyResultTypeLoc().getSourceRange().End.isValid() &&
- !this->isAccessor())
4591
+ getBodyResultTypeLoc().getSourceRange().End.isValid())
4592
return { StartLoc, getBodyResultTypeLoc().getSourceRange().End };
4593
auto LastParamListEndLoc = getParameterLists().back()->getSourceRange().End;
4594
if (LastParamListEndLoc.isValid())
0 commit comments