[PATCH] D30009: Add support for '#pragma clang attribute'
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 20 14:55:46 PDT 2017
aaron.ballman added a comment.
In https://reviews.llvm.org/D30009#705649, @efriedma wrote:
> Looking over the most recent version, I'm happy with the general semantics of push with apply_only_to. I'm not sure I see the point of apply_to: it doesn't allow the user to do anything that can't be done with apply_only_to. Also, if the apply_to list for an attribute ever changes, it becomes impossible to write code which supports both versions of the compiler.
You bring up a really good point about compiler versioning -- it would be pretty awful to force the user to use #ifs to deal with that.
I believe apply_to is somewhat useful so that the user knows what an attribute actually appertains to, and get a diagnostic if we ever extend the list of things their particular attribute can appertain to so they are forced to decide whether they want that new behavior or not.
@arphaman, what do you think about the idea of only having apply_to with the same semantics as you currently have for apply_only_to?
Repository:
rL LLVM
https://reviews.llvm.org/D30009
More information about the cfe-commits
mailing list