[PATCH] D100136: Allow applying attributes to subset of allowed subjects.

2021-07-05 Thread Bruno De Fraine via Phabricator via cfe-commits
brunodf added a comment. This change is important make better use of `#pragma clang attribute` (which is cool!), but for some uses the check still seems to restrictive. Concretely, for an attribute where `Subjects` includes `FunctionLike`, I can only match it using the rule `hasType(functionTyp

[PATCH] D100136: Allow applying attributes to subset of allowed subjects.

2021-04-12 Thread Artem Belevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG38cf112a6bc8: Allow applying attributes to subset of allowed subjects. (authored by tra). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100136/new/ https://

[PATCH] D100136: Allow applying attributes to subset of allowed subjects.

2021-04-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100136/new/ https://reviews.llvm.org/D100136 ___ cfe-commits mailing list cfe-comm

[PATCH] D100136: Allow applying attributes to subset of allowed subjects.

2021-04-08 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100136/new/ https://reviews.llvm.org/D100136 ___

[PATCH] D100136: Allow applying attributes to subset of allowed subjects.

2021-04-08 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/Sema/SemaAttr.cpp:896 + attr::SubjectMatchRule MatchRule = attr::SubjectMatchRule(Rule.first); + if (auto ParentRule = getParentAttrMatcherRule(MatchRule)) { +if (llvm::any_of(StrictSubjectMatchRuleSet, --

[PATCH] D100136: Allow applying attributes to subset of allowed subjects.

2021-04-08 Thread Artem Belevich via Phabricator via cfe-commits
tra updated this revision to Diff 336236. tra added a comment. Addressed comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100136/new/ https://reviews.llvm.org/D100136 Files: clang/lib/Sema/SemaAttr.cpp clang/test/Parser/pragma-attribute.

[PATCH] D100136: Allow applying attributes to subset of allowed subjects.

2021-04-08 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Sema/SemaAttr.cpp:896 + attr::SubjectMatchRule MatchRule = attr::SubjectMatchRule(Rule.first); + if (auto ParentRule = getParentAttrMatcherRule(MatchRule)) { +if (llvm::any_of(StrictSubjectMatchRuleSet, ---

[PATCH] D100136: Allow applying attributes to subset of allowed subjects.

2021-04-08 Thread Artem Belevich via Phabricator via cfe-commits
tra updated this revision to Diff 336212. tra added a comment. Updated Sema/pragma-attribute-strict-subjects.c Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100136/new/ https://reviews.llvm.org/D100136 Files: clang/lib/Sema/SemaAttr.cpp clang/

[PATCH] D100136: Allow applying attributes to subset of allowed subjects.

2021-04-08 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. tra added reviewers: rsmith, arphaman. Herald added a subscriber: bixia. tra requested review of this revision. Herald added a project: clang. The original intent of enforcing exact match between `apply_to` and the attribute's was to `ensure that the user will know wha