[PATCH] D30009: Add support for '#pragma clang attribute'

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 29 17:41:11 PDT 2018


rsmith added a comment.
Herald added a subscriber: llvm-commits.

One consequence of this patch (see https://reviews.llvm.org/rL341002) is that adding documentation to an existing attribute //changes the behavior of Clang//. That does not seem acceptable to me: documentation improvements should not change which attributes we allow this pragma to appertain to.

If we really want an "only documented attribtues can use this feature" rule (and I'm really not convinced that is a useful rule to enforce), I think the best way to do that is to add another flag on the Attr instance in the .td file to opt the attribute out of `#pragma clang` support, opt out all the undocumented attributes, and add an error to TableGen if we find that an undocumented attribute has `#pragma clang` support enabled.


Repository:
  rL LLVM

https://reviews.llvm.org/D30009





More information about the cfe-commits mailing list