Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 363731

Summary: [Call Hierarchy] Missing call to overriden method using address of function
Product: [Tools] CDT Reporter: Marc-André Laperle <malaperle>
Component: cdt-indexerAssignee: Markus Schorn <mschorn.eclipse>
Status: RESOLVED FIXED QA Contact: Markus Schorn <mschorn.eclipse>
Severity: normal    
Priority: P3 CC: cdtdoug
Version: 8.1.0   
Target Milestone: 8.1.0   
Hardware: All   
OS: All   
Whiteboard:

Description Marc-André Laperle CLA 2011-11-14 13:13:12 EST
Using CDT 8.1.0.201111131105

Sample code:

class A {
    virtual void foo(){} // on foo, InitCallback is in the call hierarchy

    template<typename C>
    void SetCallback(C callback){}
    void InitCallback() {
        SetCallback(&A::foo);
    }
};

class B: public A {
    virtual void foo(){} // on foo, InitCallback is NOT in the call hierarchy
};
Comment 1 Markus Schorn CLA 2011-11-28 03:35:43 EST
Added testcase and fix.
Comment 2 CDT Genie CLA 2011-11-28 04:23:01 EST
*** cdt git genie on behalf of Markus Schorn ***

    Bug 363731: Call Hierarchy for address of overridden method.

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=c83768bd6f1b5629264a817b75e6f0eab15857ad
Comment 3 Marc-André Laperle CLA 2011-11-28 10:44:37 EST
Thank you, that fixes the problem in my environment too.