[clang-include-fixer]

Hi all,

I’d like to share something I believe is incorrect behavior (bug?) of find-all-symbols from the clang-include-fixer

Consider the following header (filename is Type.h)

/* ----------------------------- */
#ifndef _TYPE_H
#define _TYPE_H

typedef struct SomeType {
int a;
int b;
} SomeType;

#endif
/* ----------------------------- */

Consider, also, main.c as follows:

/* ----------------------------- */
#include “Type.h”

static void func( void )
{
SomeType obj2;

struct SomeType obj1;
}
/* ----------------------------- */

And finally for ease of reproduction the compile_commands.json:

[

{
“directory”: “/home/me”,
“command”: “/usr/bin/gcc -std=gnu90 -c /home/me/main.c”,
“file”: “/home/me/main.c”
}
]

The result of running find-all-symbols main.c is the following