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

Bug 339475

Summary: Template constructor name resolves to wrong binding
Product: [Tools] CDT Reporter: Lukas Felber <l.felber>
Component: cdt-parserAssignee: Markus Schorn <mschorn.eclipse>
Status: RESOLVED FIXED QA Contact: Markus Schorn <mschorn.eclipse>
Severity: normal    
Priority: P3 CC: cdtdoug, malaperle, yevshif
Version: 8.0   
Target Milestone: 8.0   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
the eclipse project
none
testcase + fix mschorn.eclipse: iplog-

Description Lukas Felber CLA 2011-03-10 03:37:43 EST
Build Identifier: M20100909-0800

When resolving an implicit constructor name, the returned binding points to the wrong constructor.

Reproducible: Always

Steps to Reproduce:
1. import the attached project
2. open main.cpp
3. ctrl+clicking on "iFive" resolves to the constructor of "Templ<int, length>" instead of the more specific definition "Templ<int, 5>"

interesting is, that ctrl+clicking on "Templ<int, 5>" in main resolves to the correct definition.
another hint: when copying all template specifications directly into main.cpp and removing the includes, the resolution works correctly.
Comment 1 Lukas Felber CLA 2011-03-10 03:38:35 EST
Created attachment 190829 [details]
the eclipse project
Comment 2 Markus Schorn CLA 2011-03-28 11:38:15 EDT
Created attachment 192015 [details]
testcase + fix
Comment 3 Markus Schorn CLA 2011-03-28 11:39:24 EDT
Fixed in 8.0.
Comment 5 Marc-André Laperle CLA 2011-06-25 00:42:44 EDT
Looks like this was fixed.