File tree Expand file tree Collapse file tree 2 files changed +2
-13
lines changed Expand file tree Collapse file tree 2 files changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -966,19 +966,8 @@ class AttachedPropertyWrapperScope final : public ASTScopeImpl {
966
966
CustomAttr *attr;
967
967
VarDecl *decl;
968
968
969
- // / Because we have to avoid request cycles, we approximate the test for an
970
- // / AttachedPropertyWrapper with one based on source location. We might get
971
- // / false positives, that that doesn't hurt anything. However, the result of
972
- // / the conservative source range computation doesn't seem to be stable. So
973
- // / keep the original here, and use it for source range queries.
974
- const SourceRange sourceRangeWhenCreated;
975
-
976
969
AttachedPropertyWrapperScope (CustomAttr *attr, VarDecl *decl)
977
- : attr(attr), decl(decl),
978
- sourceRangeWhenCreated (attr->getTypeRepr ()->getSourceRange()) {
979
- ASTScopeAssert (sourceRangeWhenCreated.isValid (),
980
- " VarDecls must have ranges to be looked-up" );
981
- }
970
+ : attr(attr), decl(decl) {}
982
971
virtual ~AttachedPropertyWrapperScope () {}
983
972
984
973
protected:
Original file line number Diff line number Diff line change @@ -448,7 +448,7 @@ SourceRange ClosureParametersScope::getSourceRangeOfThisASTNode(
448
448
449
449
SourceRange AttachedPropertyWrapperScope::getSourceRangeOfThisASTNode (
450
450
const bool omitAssertions) const {
451
- return sourceRangeWhenCreated ;
451
+ return attr-> getRange () ;
452
452
}
453
453
454
454
SourceRange GuardStmtScope::getSourceRangeOfThisASTNode (
You can’t perform that action at this time.
0 commit comments