| Summary: | Extract Constant generates wrong declarations | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Tomasz Wesolowski <kosashi> | ||||||
| Component: | cdt-refactoring | Assignee: | Emanuel Graf <emanuel> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | Emanuel Graf <emanuel> | ||||||
| Severity: | normal | ||||||||
| Priority: | P3 | ||||||||
| Version: | 7.0 | ||||||||
| Target Milestone: | 7.0.1 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 7 | ||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | 318784 | ||||||||
| Bug Blocks: | |||||||||
| Attachments: |
|
||||||||
Build Identifier: The refactoring generates declaration in an incorrect way. There are two separate problems, one applies to string constants and one to float constants. Reproducible: Always Steps to Reproduce: 1. Create new .c file, insert the code: void foo() { const char* a = "foo"; double d = 123.0; } 2. Select the string "foo" and run Refactor -> Extract Constant 3. Select the value 123.0 and run Refactor -> Extract Constant 4. Observe the declarations Generated: static const float _123_0 = 123.0; static const wchar_t _kos = "kos"; Expected: static const double _123_0 = 123.0; static const char* _kos = "kos";