We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 29c1fc4 commit 1ab9e45Copy full SHA for 1ab9e45
lib/Sema/TypeCheckAttr.cpp
@@ -194,9 +194,9 @@ class AttributeEarlyChecker : public AttributeVisitor<AttributeEarlyChecker> {
194
TC.diagnose(attr->getLocation(), diag::member_cannot_be_final)
195
.fixItRemove(attr->getRange());
196
197
- // Invalidate the attribute so child declarations are not flagged as final
+ // Remove the attribute so child declarations are not flagged as final
198
// and duplicate the error message.
199
- attr->setInvalid();
+ D->getAttrs().removeAttribute(attr);
200
return;
201
}
202
0 commit comments