Skip to content

Commit 166eebe

Browse files
committed
[Gardening] BodyKind::Synthesize implies empty SourceRange
1 parent 3c551a7 commit 166eebe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/AST/Decl.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4593,7 +4593,9 @@ DynamicSelfType *FuncDecl::getDynamicSelfInterface() const {
45934593

45944594
SourceRange FuncDecl::getSourceRange() const {
45954595
SourceLoc StartLoc = getStartLoc();
4596-
if (StartLoc.isInvalid()) return SourceRange();
4596+
if (StartLoc.isInvalid() ||
4597+
getBodyKind() == BodyKind::Synthesize)
4598+
return SourceRange();
45974599

45984600
if (getBodyKind() == BodyKind::Unparsed ||
45994601
getBodyKind() == BodyKind::Skipped)

0 commit comments

Comments
 (0)