On Wed, Jun 20, 2012 at 9:52 PM, Eric M. Ludlam <ericludlam@gmail.com> wrote:
Hi Troy,

Semantic does support typedefs, and we have several tests that exercise some rather complex typedefs.

One of the steps after the type (Paths) in your case is identified is to look it up, and using the found type, resolve any indirection.   I think the debug data probably failed to resolve the typedef, and gave an erroneous response about the starting type (Paths) instead of whatever Paths resolves to which would probably be more useful.

Do you know what Paths is typedef'd to, and if that type is in the list of identified types produced from the debug output?

  typedef std::vector< Path > Paths;

class Path appears in the list of known types, but std::vector is missing from the list of known symbols in the current scope, as is the std namespace.  There is an explicit #include <vector> at the top of the file, and it does not claim that there are any unknown header files.


On 06/20/2012 04:49 PM, Troy Daniels wrote:
Will typedefs confuse semantic/cedet?  Our code uses a lot of typedefs,
and if semantic does not understand them, it will be a significant problem.

I was editing one buffer, and saw that the TAGS, C++, Project, Senator
and SRecoder menus were all empty.  I ran semantic-analyze-debug-assit
at a function that I wanted to find references for, and saw the output
below.  The code near the point was

  Paths solve( const GlwDigraph::Node& rGlwUniversalNode,
               double& rSolutionCost );

and the point was in solve.  (This is a header file.)  It has recognized
Paths as a typedef, but seems unable to use that.

Is this expected behavior?


Unable to find datatype for: "class Paths solve (const class
GlwDigraph::Node rGlwUniversalNode,double rSolutionCost)".
Declared type is: "class Paths {}"
Raw data type is: ("Paths" type (:type "class") nil nil)

Semantic could not find this data type in any of its global tables.

Semantic locates datatypes through either the local scope, or the global

Local Scope Information:
 * Tag Class Constraint against SCOPE: (type)
 >> Known parent types with possible in scope symbols:
"namespace glw {}"
  class StitchingGraphNSAlg {}

 >> Known symbols within the current scope:
  typedef OrigArcFlowBoundMap {}
  typedef ArcCostMap {}
  typedef OrigArcCostMap {}
  typedef SplitDigraph {}
  typedef NetworkSimplexType {}
  typedef Paths {}
  class Path {}
  typedef NodeSupplyMap {}
  typedef NodeTreeMap {}
  typedef ArcFlowMap {}
  typedef ArcTreeMap {}
  typedef OrigDigraph {}
  typedef GlwArcFlowBoundMap {}
  typedef FlowBound {}
  typedef Cost {}
  typedef GlwArcCostMap {}
  typedef GlwDigraph {}
  class StitchingGraphNSAlg {}

 * No known symbols declared locally.
Semantic creates and maintains a type cache for each buffer.
If the type is a global type, then it should appear in they typecache.
To examine the typecache, type:

  M-x semanticdb-typecache-dump RET   [ Do It ]

Current typecache Statistics:
      1 types global in this file
    136 types from includes.

If the datatype is not in the typecache, then your include
path may be incorrect.

Include Path Summary:

This file's project include search is handled by the EDE object:
  Buffer Target:  #<ede-cpp-root-target
  Buffer Project: #<ede-cpp-root-project insight-sto202>
  Backup Locator: #<ede-locate-base Loc>

The system include path is:

Include Summary:

StitchingGraphNSAlg_decl.h contains 8 includes.
   Unknown Includes:  0
   Unparsed Includes: 0
   Parsed Includes:   8

 No unknown includes.


Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

cedet-semantic mailing list