Skip to content

Conversation

@sepy97
Copy link
Contributor

@sepy97 sepy97 commented Jan 16, 2026

Modified DeclAttributeList::add() to validate whether the attribute can appear on the given declaration before adding it to the list.

Modified DeclAttributeList::add() to validate whether the attribute
can appear on the given declaration before adding it to the list.
rdar://164975727
@sepy97
Copy link
Contributor Author

sepy97 commented Jan 16, 2026

@swift-ci please test

@sepy97 sepy97 force-pushed the preconcurrency_textualinterface branch from cbe7200 to bbd71a4 Compare January 16, 2026 00:50
@sepy97
Copy link
Contributor Author

sepy97 commented Jan 16, 2026

@swift-ci please test

Attr->Next = DeclAttrs;
DeclAttrs = Attr;
void add(DeclAttribute *Attr, const Decl *D = nullptr) {
if (D && !Attr->canAppearOnDecl(D)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

out of curiosity – do you have an example of something this will now handle that previously would have been permitted?

@sepy97
Copy link
Contributor Author

sepy97 commented Jan 16, 2026

Resolves issue #85564

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants