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,
----------------
rsmith wrote:
> Does this need to be a loop? (Can we have a grandparent matcher rule?)
No. We currently have two levels of tablegen classes: 
`AttrSubjectMatcherRule<list<...AttrSubjectMatcherSubRule> subrules>` and 
`AttrSubjectMatcherSubRule` does not allow further nesting.


================
Comment at: clang/test/Sema/pragma-attribute-strict-subjects.c:59
 #pragma clang attribute push (__attribute__((abi_tag("a"))), apply_to = 
any(enum_constant, function, record(unless(is_union)), variable, 
variable(is_parameter)))
 // FIXME: comma in this diagnostic is wrong.
+// expected-error@-2 {{attribute 'abi_tag' can't be applied to 
'enum_constant'}}
----------------
rsmith wrote:
> The FIXME here is "fixed" now. Please can you add another example that shows 
> the incorrect comma and move the FIXME there?
Added another matcher to preserve the comma in the diagnostic.


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-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to