Skip to content

Anonymous structure error in function's parameters #3

@X-Ryl669

Description

@X-Ryl669

Take this code for example:

typedef struct {
   int a;
} M;

int foo(const M bar);

Right now, crefl can't reproduce the signature for the foo function because the bar parameter is of type "qualifier(struct)" instead of "qualifier(typedef(struct))". Since the structure is anonymous, the only way to call this function is to use the typedef but this is not what crefl has stored in its database.

So, is there a way to find out the typedef's decl_ref for an anonymous structure's decl_ref ?
Or better, would it be possible for crefl to store the parameter as a typedef instead of a struct at first ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions