aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/struct-attribute-placement.c
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2019-11-15 00:06:14 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2019-11-15 01:42:54 +0100
commit233d4e17c544e1de252aed8f409630599104dbc7 (patch)
tree83f39dd2618b8656d342a8a0bd946452e8d1f010 /validation/struct-attribute-placement.c
parentfd3528aa0409874386610ce63bb647fff8312fd9 (diff)
downloadsparse-dev-233d4e17c544e1de252aed8f409630599104dbc7.tar.gz
function attributes apply to the function declaration
Function attributes relate to the function declaration they appear in. Sparse ignore most these attributes but a few ones have a semantic value: 'pure', 'noreturn' & 'externally_visible'. Due to how Sparse parse attributes and how these attributes are stored for functions, the attributes 'pure' & 'noreturn' are applied not to the function itself but its return type if the function returns a pointer. Fix this by extracting these attributes from the declaration context and ensure they're applied to the declarator. Reported-by: John Levon <john.levon@joyent.com> Reported-by: Alex Kogan <alex.kogan@oracle.com> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/struct-attribute-placement.c')
0 files changed, 0 insertions, 0 deletions