[PATCH] D30009: Add support for '#pragma clang attribute'
Hal Finkel via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 16 10:49:42 PST 2017
hfinkel added a comment.
In https://reviews.llvm.org/D30009#678890, @arphaman wrote:
> In https://reviews.llvm.org/D30009#678091, @hfinkel wrote:
>
> > I don't understand why it only supports some attributes. Is there some handling that needs to take place (I don't see anything obvious in this patch)? If most attributes will "just work", I'd much rather opt-out the few exceptions (which we can then explicitly document), if any, than using this opt-in solution.
>
>
> I think it would be reasonable to use an opt-out approach. I think the following set of initial rules should determine when an attribute should not be supported by the pragma:
>
> - If an attribute is late parsed
> - Or if it has no GNU/CXX11 spelling
> - Or if it has no subject list, or its subject list is empty (excluding annotate)
> - Or if it derives from StmtAttr or TypeAttr
SGTM.
Repository:
rL LLVM
https://reviews.llvm.org/D30009
More information about the cfe-commits
mailing list