[PATCH] D16219: PR8901: attribute "mode" rejected for enums and dependent types
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 27 06:35:35 PST 2016
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
Aside from one nitpick about the diagnostic wording, this LGTM.
================
Comment at: include/clang/Basic/Attr.td:882
@@ -881,3 +881,3 @@
let Spellings = [GCC<"mode">];
- let Subjects = SubjectList<[Var, TypedefName, Field], ErrorDiag,
- "ExpectedVariableFieldOrTypedef">;
+ let Subjects = SubjectList<[Var, Enum, TypedefName, Field], ErrorDiag,
+ "ExpectedVariableEnumFieldOrTypedef">;
----------------
One of these days I may have to come up with a more general solution for this sort of subject list. :-(
================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:2856
@@ -2855,1 +2855,3 @@
+def err_enum_mode_vector_type : Error<
+ "mode %0 is not supported for enumeral types">;
def warn_attribute_nonnull_no_pointers : Warning<
----------------
s/enumeral/enumeration
http://reviews.llvm.org/D16219
More information about the cfe-commits
mailing list