Bug 212433 - Type Hierarchy can sometimes refer to incorrect base type
Summary: Type Hierarchy can sometimes refer to incorrect base type
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 5.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-10 12:11 EST by Jason Montojo CLA
Modified: 2020-09-04 15:20 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Montojo CLA 2007-12-10 12:11:24 EST
Consider the following two header files.  These headers are not meant to be included by the same translation unit, but they're part of the same project:

// thtest1.h
class Class1 {};
class Class2 : public Class1 {};

// thtest2.h
class Class1 {};
class Class3 : public Class1 {};

1. Open thtest1.h.
2. Open Type Hierarchy on Class2.
3. Observe that "Class1 > Class2" shows up twice in the Type Hierarchy View.
4. Double-click on each Class1 in the Type Hierarchy View.
5. Observe that one of the Class1 references opens thtest1.h and the other opens thtest2.h.  This implies that Class2 also derives from thtest2's Class1, which is incorrect.