Allow "mode" attribute for enum types, except for vector modes, for compatibility with GCC. Support "mode" attribute with dependent types.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Updated the patch after committed fix for http://reviews.llvm.org/D16301 (r258213).
This patch:
- Adds "Enum" Subject to 'mode' attribute to be able to compile code like "typedef enum { X } attribute((mode(QI))) T;"
- Moves handling of the attribute to a new Sema's method in order to support 'mode' attribute on dependent types;
- Adds several cases to the tests (both for templates and non-dependent types).
Please take a look.
Comment Actions
Aside from one nitpick about the diagnostic wording, this LGTM.
include/clang/Basic/Attr.td | ||
---|---|---|
882 ↗ | (On Diff #45401) | One of these days I may have to come up with a more general solution for this sort of subject list. :-( |
include/clang/Basic/DiagnosticSemaKinds.td | ||
2856 ↗ | (On Diff #45401) | s/enumeral/enumeration |