Skip to content

Commit 66873b9

Browse files
committed
ASTScope: Fix SubscriptDeclScope source range
The source range needs to contain any attributes on the subscript declaration, since those might create child scopes (@_specialize, property wrappers, etc).
1 parent 824ecdd commit 66873b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/AST/ASTScopeSourceRange.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ SourceRange TopLevelCodeScope::getSourceRangeOfThisASTNode(
226226

227227
SourceRange SubscriptDeclScope::getSourceRangeOfThisASTNode(
228228
const bool omitAssertions) const {
229-
return decl->getSourceRange();
229+
return decl->getSourceRangeIncludingAttrs();
230230
}
231231

232232
SourceRange

0 commit comments

Comments
 (0)