Page MenuHomePhabricator

PR26111: segmentation fault with __attribute__((mode(QI))) on function declaration
ClosedPublic

Authored by d.zobnin.bugzilla on Jan 12 2016, 5:40 AM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

d.zobnin.bugzilla retitled this revision from to PR26111: segmentation fault with __attribute__((mode(QI))) on function declaration.
d.zobnin.bugzilla updated this object.
d.zobnin.bugzilla added a subscriber: cfe-commits.
aaron.ballman edited edge metadata.Jan 12 2016, 6:53 AM

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.

d.zobnin.bugzilla edited edge metadata.

Thanks for the review! Updated the patch: added Subjects line for the attribute and removed the "err_attr_wrong_decl" diagnostics.

aaron.ballman accepted this revision.Jan 14 2016, 6:53 AM
aaron.ballman edited edge metadata.

LGTM, thank you!

This revision is now accepted and ready to land.Jan 14 2016, 6:53 AM
This revision was automatically updated to reflect the committed changes.