| Summary: | Recognition of an inner type of a type derived from template. | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Konstantin Stupnik <konstantin.stupnik> |
| Component: | cdt-indexer | Assignee: | Project Inbox <cdt-indexer-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | Markus Schorn <mschorn.eclipse> |
| Severity: | normal | ||
| Priority: | P3 | CC: | cdtdoug, yevshif |
| Version: | 7.0.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
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 *** *** cdt cvs genie on behalf of mschorn *** Bug 333186: Testcase. [*] AST2TemplateTests.java 1.200 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java?root=Tools_Project&r1=1.199&r2=1.200 |
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.