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
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://
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
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
___
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,
--
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.
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,
---
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/
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