Typedef parameter resolution needed

From FetchWiki

Jump to: navigation, search


[edit] Status

  • Problem described
  • Solution suggested
  • Solution implemented

[edit] Problem description

In case the signature of a method or function definition differs slightly from its declaration, Snavtofamix wrongfully considers the definition and the declaration as two different entities, and accordingly, will generate two CDIF entities. Example:

  • writeXML(char*,Spreadsheet*,vector<Alias>*) in spreadsheet/xmlparser.h
  • writeXML(char*,Spreadsheet*,aliasVector*) in spreadsheet/xmlparser.cxx

In the above example, aliasVector (a typedef alias) should have been rephrased.

[edit] Relevance

Being unable to match such signatures, Snavtofamix now generates too many functions and methods, resulting in False Positives. This introduces problems for metric analysis.

[edit] Suggested Solutione

When constructing MethodEntities and FunctionEntities, the parameters should be rephrased by resolving typedefs.

Personal tools