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 {
966966 CustomAttr *attr;
967967 VarDecl *decl;
968968
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-
976969 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) {}
982971 virtual ~AttachedPropertyWrapperScope () {}
983972
984973protected:
Original file line number Diff line number Diff line change @@ -448,7 +448,7 @@ SourceRange ClosureParametersScope::getSourceRangeOfThisASTNode(
448448
449449SourceRange AttachedPropertyWrapperScope::getSourceRangeOfThisASTNode (
450450 const bool omitAssertions) const {
451- return sourceRangeWhenCreated ;
451+ return attr-> getRange () ;
452452}
453453
454454SourceRange GuardStmtScope::getSourceRangeOfThisASTNode (
You can’t perform that action at this time.
0 commit comments