Open peckto opened 3 years ago
Typedefs are generally supported, as you can see with the TypedefDeclaration
child of the TranslationUnitDeclaration
that maps MyInt
to int
. The concrete case you have here is unfortunately parsed in a wrong way by the typedef handling mechanisms
I have a question about the representation of C typedef statements in the cpg.
Example:
When loading the sample C code via cpg-vis-neo4j (cpg v3.5.1), the graph looks like the following:
When analyzing structs (where typedefs are often used), it would be nice, to have an RECORD_DECLARATION edge between the ObjectType
MyS_t
and the Declaration ofMyS
. In this way the Declaration ofs1
ands2
could be resolved the same way. In the current cpg, the only way I see to resolve this problem is to create a link between the VariableDeclarationMyS_t
and the ObjectTypeMyS_t
based the name.Can you reproduce this behavior? Is there a different way, to resolve the Declaration of
s2
?