This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 162205

Summary: [call graph] Lacks support for template instantiation (parameter dependent)
Product: cnd Reporter: rmartins <rmartins>
Component: NavigationAssignee: issues@cnd <issues>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 7.0   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description rmartins 2009-04-08 11:54:50 UTC
Hi,

class C{
public:
    C(){}
    ~C(){}

    virtual void doit(){}
};
template <class T>
class B{
public:
    typedef int basic_type;
    B(){}
    ~B(){}
    virtual void doit(){}
};
template <typename X>
class A: public B<X>{
public:        
    A(){}
    A(X* x):m_x(x){}
    ~A(){}

    void doit(){}
    void doit2(){
        doit();
        m_x->doit();
    }
    X* getX(){return m_x;}
protected:
    X* m_x;
};


int main()
{
   A<C> a;
   a.doit2(); <------------- calling "call graph" here
   return 0;
}

At "a.doit2()" the call graph only outputs:
A::doit2 ---> A::doit  , omitting the C::doit (given by m_x->doit(), with m_x type being C).


Thanks,
Rolando
Comment 1 rmartins 2009-04-08 12:03:33 UTC
Hi,
I am not sure, but perhaps when we have the http://editor.netbeans.org/issues/show_bug.cgi?id=158692 implemented, we
could have multiple "sub-graphs" per a function call. Example:

class C{
public:
    C(){}
    ~C(){}

    virtual void doit(){}
};

class D{
public:
    C(){}
    ~C(){}

    virtual void doit(){}
};

class E{
public:
    C(){}
    ~C(){}

    virtual void doit(){}
};


template <typename X>
class A{
public:        
    A(){}
    A(X* x):m_x(x){}
    ~A(){}

    void doit(){}
    void doit2(){             <---- Calling call graph here
        doit();
        m_x->doit();
    }
    X* getX(){return m_x;}
protected:
    X* m_x;
};

if we called "call graph" on A::doit2 we could obtain the following:
             
                A::doit2
                   |
                   V 
                A::doit
                   |                   
         ---------------------
         |         |         |
    C::doit    D::doit    E::doit

Thanks,
Rolando