Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check the TagDecl in TypedefNameDecl for extra attributes #69

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

giulianobelinassi
Copy link
Collaborator

Some typedef definitions have attributes that are applied to the TagDecl it defines to. For example:

typedef union {
  struct sockaddr *__restrict __sockaddr__;
} __SOCKADDR_ARG __attribute__((__transparent_union__));

Here, attribute((transparent_union)) is applied to the union, not the typedef. Hence we also need to search for the TagDecl (the union in this case) for the extra attributes.

Closes #68

Some typedef definitions have attributes that are applied to the
TagDecl it defines to. For example:
```
typedef union {
  struct sockaddr *__restrict __sockaddr__;
} __SOCKADDR_ARG __attribute__((__transparent_union__));

```

Here, __attribute__((__transparent_union__)) is applied to the union,
not the typedef. Hence we also need to search for the TagDecl (the
union in this case) for the extra attributes.

Signed-off-by: Giuliano Belinassi <[email protected]>
@giulianobelinassi giulianobelinassi merged commit d8e2bb0 into main Jul 9, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Attribute of typedef dropped, leads to failure of extraction.
1 participant