Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364534 - Indentation for switch statement with comma in macro expansion
Summary: Indentation for switch statement with comma in macro expansion
Status: RESOLVED WORKSFORME
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 8.0.1   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Anton Leherbauer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-23 00:20 EST by Roland Schulz CLA
Modified: 2016-12-29 18:26 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roland Schulz CLA 2011-11-23 00:20:50 EST
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
Comment 1 Nathan Ridge CLA 2015-07-23 20:59:52 EDT
I can't reproduce this issue. Do you still see it?
Comment 2 Nathan Ridge CLA 2016-12-29 18:26:36 EST
Closing per comment 1. Feel free to reopen if you're still seeing this.