arphaman added a comment. In https://reviews.llvm.org/D30009#706515, @aaron.ballman wrote:
> In https://reviews.llvm.org/D30009#706171, @arphaman wrote: > > > I would be ok with that. We could merge `apply_to` and `apply_only_to` into > > a single `apply_to` matching rule set specifier (it would behave like > > `apply_only_to`). > > > That sounds sensible to me. > > > I guess one downside would be is that it will become harder to fill out all > > the match rules if one wants to apply an attribute to all possible > > declarations. I suppose the attribute documentation generator can be > > updated to include the full match rule set for each attribute instead of > > just yes/no in the `#pragma clang attribute` documentation column. > > Okay, so here's a possibly crazy idea (and it may be way too magical): what > if `#pragma clang attribute push(foo)` generated the fix-it hint to suggest > all of the targets the attribute can apply to? Alternatively, what if any > malformed parsing of `#pragma clang attribute push(foo)` automatically do > this? We know the user is trying to apply attributes to declarations, and we > know which attribute they're trying for, so it somewhat stands to reason that > the rest of the syntax can be supplied for them... and we need *something* in > apply_to, so why not default to everything? Something like that should work. Although we probably still want to have them in the documentation as well. Repository: rL LLVM https://reviews.llvm.org/D30009 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits