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 203792 - Call graph with "Show Overridden Methods" on: distinguish non-pointer variables
Summary: Call graph with "Show Overridden Methods" on: distinguish non-pointer variables
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 7.1
Hardware: All All
: P4 normal (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-17 04:18 UTC by Vladimir Kvashin
Modified: 2014-11-21 13:57 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kvashin 2011-10-17 04:18:05 UTC
In the code below, call graph reports
f2search() called from caller() that is called from fun2()
(in the case "Show Overridden Methods" is on).

But it's quite obvious that it can't be called from fun2, since it uses a non-pointer type (Anc a), so call graph shouldn't show it.

struct Anc {
    virtual void f2search() {        
    }
    virtual void caller() {        
    }
};

struct Desc : Anc {
    virtual void f2search() {        
    }
    virtual void caller() {
        Anc a;
        a.f2search();
    }
};

static void fun2() {
    Anc a;
    a.caller(); // it's Anc::caller, never Desc::caller
}
Comment 1 Vladimir Kvashin 2011-10-17 04:18:37 UTC
I'm not really sure it's a P3... probably P4?
Comment 2 Leonid Lenyashin 2012-10-08 17:07:25 UTC
Do we have the same issue in Find Usages?