Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333186 - Recognition of an inner type of a type derived from template.
Summary: Recognition of an inner type of a type derived from template.
Status: CLOSED DUPLICATE of bug 329795
Alias: None
Product: CDT
Classification: Tools
Component: cdt-indexer (show other bugs)
Version: 7.0.1   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Markus Schorn CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-24 05:53 EST by Konstantin Stupnik CLA
Modified: 2011-01-07 05:23 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Stupnik CLA 2010-12-24 05:53:32 EST
Here is example:

template <class T>
struct TestTmpl{
  struct Inner1;
  struct Inner2{
    Inner1* ptr1;
  };
  struct Inner1{
    Inner2* ptr2;
  };
};

struct TestImpl:TestTmpl<int>{};

void func(TestImpl::Inner1* ptr1)
{
  TestImpl::Inner2* ptr2=ptr1->ptr2;
  func(ptr2->ptr1);
}

Call to func is colored as 'problem'.
Jump to definition jumps to this function only if it is not overridden.
However, both ptr1 and ptr2 are handled by code assistant correctly.
It looks like CDT do not recognize that TestImpl::Inner1* and TestTmpl<int>:Inner1* are the same types.
Comment 1 Markus Schorn CLA 2011-01-07 05:16:03 EST
This is a different example for bug 329795. I have added it as a testcase.

*** This bug has been marked as a duplicate of bug 329795 ***