[PATCH] D143670: Stop claiming we support [[carries_dependency]]
Tom Honermann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 9 17:53:55 PST 2023
tahonermann added a comment.
> The guidance from EWG this week and in the past was that we are always required to 'parse and diagnose appertainment' of standard attributes, but not to enable __has_cpp_attribute unless we actually 'do' something with it. I intend/suggest we add a condition to the CXX tag of 'is supported' with some sort of conditional for checking diagnostic and O level (or just straight 'false' in this case).
I've been thinking about the distinction here as well. I'm leaning towards the idea of Introducing a feature test macro for each standard attribute (e.g., `__cpp_attr_carries_dependency` that, If defined, indicates that the implementation is 1) aware of the attribute (won't diagnose uses of it as an unknown attribute) and 2) will perform syntax and appertainment checks. Conformance would require defining the feature test macro for corresponding standard versions (unless EWG can be convinced that standard attributes are optional). `__has_cpp_attribute(XXX)` would, of course, only be non-zero if the corresponding `__cpp_attr_XXX` feature test macro is defined.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143670/new/
https://reviews.llvm.org/D143670
More information about the cfe-commits
mailing list