[cfe-dev] Fetching typedef details via libclang

Stefan Seefeld stefan at seefeld.name
Mon Apr 11 17:41:17 PDT 2011


Doug,

thanks. The case I was most interested in is the "typedef struct {...} 
CXString;" case, since this is a pretty common idiom in C, and would 
result in lots of anonymous structs in the documentation. My hack in 
Synopsis is to check whether the first token in the declaration is 
"typedef", and whether the struct is in fact anonymous. If both is true, 
I fold the two into one.

That seems to work reasonably well (see 
http://synopsis.fresco.org/clang/libclang for example).

FWIW,
         Stefan


-- 

       ...ich hab' noch einen Koffer in Berlin...




More information about the cfe-dev mailing list