<div dir="ltr"><span style="font-family:courier new,monospace"><span style="font-family:arial,sans-serif">Hi all,<br><br>I'd like to share something I believe is incorrect behavior (bug?) of find-all-symbols from the clang-include-fixer<br><br>Consider the following header (filename is Type.h)</span><br><br>/* ----------------------------- */<br>#ifndef _TYPE_H<br>#define _TYPE_H<br><br>typedef struct SomeType {<br>   int a;<br>   int b;<br>} SomeType;<br><br>#endif<br>/* ----------------------------- */<br><span style="font-family:arial,sans-serif"><br><br>Consider, also, main.c as follows:</span><br><br>/* ----------------------------- */<br>#include "Type.h"<br><br>static void func( void )<br>{<br>    SomeType obj2;<br><br>    struct SomeType obj1;<br>}<br>/* ----------------------------- */<br><span style="font-family:arial,sans-serif"><br>And finally for ease of reproduction the compile_commands.json:</span><br></span><div><span style="font-family:courier new,monospace"><br></span></div><div><span style="font-family:courier new,monospace">[</span></div><div><span style="font-family:courier new,monospace"></span></div><span style="font-family:courier new,monospace">{<br>   "directory": "/home/me",<br>   "command": "/usr/bin/gcc -std=gnu90 -c /home/me/main.c",<br>   "file": "/home/me/main.c"<br>}<br>]<br><br><span style="font-family:arial,sans-serif">The result of running `find-all-symbols main.c` is the following</span><br><br>---<br>Name:        SomeType<br>Contexts:    []<br>FilePath:    '/home/me/Type.h'<br>Type:        TypedefName<br>Seen:        1<br>Used:        1<br>...<br><br><span style="font-family:arial,sans-serif">which appears to be missing the definition of struct SomeType<br><br>Notably, if the file is parsed as c++ (eg change "gcc" to "g++" and "gnu90" to "gnu++98" above) then the result is</span><br><br>---<br>Name:        SomeType<br>Contexts:    []<br>FilePath:    '/home/me/Type.h'<br>Type:        Class<br>Seen:        1<br>Used:        2<br>...<br>---<br>Name:        SomeType<br>Contexts:    []<br>FilePath:    '/home/me/Type.h'<br>Type:        TypedefName<br>Seen:        1<br>Used:        1<br>...<br><span style="font-family:arial,sans-serif"><br>which looks ok.<br><br>Is this a bug or is there something I'm missing?<br><br>Kind Regards,<br>Achilles T.</span><br><br><br><br><br><br><br><br><br></span></div>