ts-docstr icon indicating copy to clipboard operation
ts-docstr copied to clipboard

Cannot insert docstrings for C functions with struct arguments

Open space-jam- opened this issue 1 year ago • 1 comments

If a C function is declared like:

struct point {
    int x;
    int y;
};

int foo(struct point p) {
     return p.x + p.y;
}

ts-docstr-at-point will fail with the error:

user-error: Multiple declarations are invalid, 2.

I think this is triggered by the use of the struct keyword, as a basic or typedef name won't cause this issue.

space-jam- avatar Jun 16 '23 12:06 space-jam-