| Summary: | Indentation for switch statement with comma in macro expansion | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Roland Schulz <roland> |
| Component: | cdt-editor | Assignee: | Project Inbox <cdt-editor-inbox> |
| Status: | RESOLVED WORKSFORME | QA Contact: | Anton Leherbauer <aleherb+eclipse> |
| Severity: | normal | ||
| Priority: | P3 | CC: | cdtdoug, yevshif, zeratul976 |
| Version: | 8.0.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
I can't reproduce this issue. Do you still see it? |
For the following code: void f(int a, int b, char* s, int t) { } #define FARGS 0,1 void g(int d, int type) { switch (d) { case 0: f(FARGS, "", type); break; case 1: break; } } Format indents "case 1" by one additional level. Without the comma in the macro definition the indentation is correct. It is also correct without the macro usage. Also "Source->Correct Indentation" indents it correctly. Only "Source->Format" indents it incorrectly together with this macro. Reproducible: Always