emacs-vs/ts-docstr

Cannot insert docstrings for C functions with struct arguments

Opened this issue · 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.

Ah, yes. You probably right. struct is caught as the declarations...

This might be hard to solve. 🤔