Missing Anonymous Struct Attributes

From FetchWiki

Jump to: navigation, search

[edit] Status

  • Issue resolved: it turned out to be a CDIF version issue.

[edit] Problem description

A case was identified in which the attributes of an anonymous struct were not extracted. In the following extract, type names have been encoded.

 typedef struct
 {
   T_Foo foo_m;
   T_Bar bar_m;
   T_Baz baz_m;
   T_Qux qux_m;
   T_Quux quux_m;
 }
   T_Quuux;

When the poster queried the CDIF for the names of the attributes of this struct, he gets nothing. Accordingly, no accesses could be found to these attributes.

[edit] Replication of the problem

Snavtofamix contains a test, named typedeffedStructDecl which resembles the code extract mentioned above. The test verifies that a class T_Quuux is generated, having as attributes {foo_m,bar_m,baz_m,qux_m,quux_m}. Thus, the fact that this is a typedeffed struct declaration does not seem to cause any deviations from normal class declarations.

When replicating the exact occurence of the problem, as described by the poster, the following issues arose:

  • The SourceNavigator database dump contains declarations of T_Quuux, but not in the source file indicated by the poster. This appears to indicate that the source file was not included in the input given to SourceNavigator.
  • Since I do not have the full code base given as input to SourceNavigator, I cannot find out whether the other declarations of T_Quuux are identical to the one the poster is referring to. Nonetheless, the list of attribute-names contained by these similar declarations is a subset of the attribute-names of the T_Quuux referenced by the poster. Moreover, we have found accesses to these attributes. Since the poster indicated that no such attributes could be found in the CDIF file, this might indicate a version issue (CONFIRMED BY ISSUE POSTER).
Personal tools