Allow "mode" attribute to be applied to VarDecl, not ValueDecl (which includes FunctionDecl and EnumConstantDecl), emit an error if this attribute is used with function declarations and enum constants.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
I think the better way to fix this is to add a Subjects line in Attr.td that limits the mode attribute to just TypedefNameDecl and VarDecl, then remove err_attr_wrong_decl entirely.
Comment Actions
Thanks for the review! Updated the patch: added Subjects line for the attribute and removed the "err_attr_wrong_decl" diagnostics.