File tree 1 file changed +0
-20
lines changed
1 file changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -966,26 +966,6 @@ case DeclKind::ID: return cast<ID##Decl>(this)->getSourceRange();
966
966
SourceRange Decl::getSourceRangeIncludingAttrs () const {
967
967
auto Range = getSourceRange ();
968
968
969
- // Attributes on AccessorDecl may syntactically belong to PatternBindingDecl.
970
- // e.g. 'override'.
971
- if (auto *AD = dyn_cast<AccessorDecl>(this )) {
972
- // If this is implicit getter, accessor range should not include attributes.
973
- if (AD->isImplicitGetter ())
974
- return Range;
975
-
976
- // Otherwise, include attributes directly attached to the accessor.
977
- SourceLoc VarLoc = AD->getStorage ()->getStartLoc ();
978
- for (auto *Attr : getParsedAttrs ()) {
979
- if (!Attr->getRange ().isValid ())
980
- continue ;
981
-
982
- SourceLoc AttrStartLoc = Attr->getRangeWithAt ().Start ;
983
- if (getASTContext ().SourceMgr .isBeforeInBuffer (VarLoc, AttrStartLoc))
984
- Range.widen (AttrStartLoc);
985
- }
986
- return Range;
987
- }
988
-
989
969
// Attributes on VarDecl syntactically belong to PatternBindingDecl.
990
970
if (isa<VarDecl>(this ) && !isa<ParamDecl>(this ))
991
971
return Range;
You can’t perform that action at this time.
0 commit comments