| Summary: | Extract local variable doesn't put template type parameters | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | xeor | ||||
| Component: | cdt-refactoring | Assignee: | Emanuel Graf <emanuel> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Emanuel Graf <emanuel> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | cdtdoug | ||||
| Version: | 8.0 | ||||||
| Target Milestone: | 7.0.2 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows Vista | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Build Identifier: M20100909-0800 When extracted expression is of template type, the resulting variable will be declared with type name only, without template parameters. The source of the problem problem seems to be in org.eclipse.cdt.internal.core.dom.parser.cpp.CPPTemplateDefinition.getNameCharArray() called by org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor.getQualifiedNameCharArray(IBinding) - only template name is returned Reproducible: Always Steps to Reproduce: The following sample code: template<class T> class Foo { }; Foo<int> getFoo(); int main() { getFoo(); // This line is selected return 0; } will result in proposal Foo getFoo0 = getFoo(); getFoo0; instead of Foo<int> getFoo0 = getFoo(); getFoo0;