Skip to content

scan: support deprecated struct members

Jason Crain requested to merge jcrain/gtk-doc:DeprecatedStructMember into master

gcc allows deprecating members of structs. For example:

struct data { int x G_GNUC_DEPRECATED_FOR(replacement); };

However, this currently causes the entire struct to be marked as deprecated and confuses mkdb because it doesn't understand the G_GNUC_DEPRECATED_FOR symbol.

Fix this by having the whole struct only be marked as deprecated if the 'DEPRECATED' is after the closing bracket of the struct, similar to how it already does for enums, and having scan automatically remove all G_GNUC* decorators from struct members, similar to how it already does for functions.

Merge request reports