| Summary: | [qf] Create local variable quick fix creates variable of invalid type | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Sergey Prigogin <eclipse.sprigogin> | ||||
| Component: | cdt-editor | Assignee: | Project Inbox <cdt-editor-inbox> | ||||
| Status: | NEW --- | QA Contact: | Jonah Graham <jonah> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | aegges, cdtdoug, elaskavaia.cdt, kosashi, yevshif | ||||
| Version: | 8.0 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
I've got this solved. I can't isolate a patch for this yet as it depends on some stuff done in bug 342160. The patch also handles cases such as f(&&x,0) and f(*x, 0). > f(&&x, 0)
should be: f(**x, 0)
Created attachment 198998 [details]
fix + test
depends on 342160
Local branching in Git seems to be helpful.. I hope I made the patch right. :)
Patch was merged into fix for bug 342160 |
In the following code, position the cursor on x and select Create local variable from the quick fix menu. void f(double* p, int q); void test() { int x; f(&x, 0); } The variable is created with int type instead of double: void f(double* p, int q); void test() { int x; f(&x, 0); }