Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 359905

Summary: Invalid formatting of comment in enum
Product: [Tools] CDT Reporter: Sergey Prigogin <eclipse.sprigogin>
Component: cdt-coreAssignee: Sergey Prigogin <eclipse.sprigogin>
Status: RESOLVED FIXED QA Contact: Doug Schaefer <cdtdoug>
Severity: normal    
Priority: P3 CC: yevshif
Version: 8.0   
Target Milestone: 8.0.2   
Hardware: All   
OS: All   
Whiteboard:

Description Sergey Prigogin CLA 2011-10-04 15:49:00 EDT
A comment for the last item in a C++ enum is always moved to the next line, when it should stay put. Before:

enum SomeEnum {
 FirstValue,  // first value comment
 SecondValue  // second value comment
};

After auto-formatting:

enum SomeEnum {
 FirstValue,  // first value comment
 SecondValue
// second value comment
};
Comment 1 Sergey Prigogin CLA 2011-10-04 19:37:38 EDT
Fixed in cdt_8_0 and master.
Comment 2 CDT Genie CLA 2011-10-04 20:23:01 EDT
*** cdt git genie on behalf of Sergey Prigogin ***

    Bug 359905 - Invalid formatting of comment in enum.

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=3edce39739a91463835411e629001eef02d75ebf
Comment 3 CDT Genie CLA 2011-10-04 20:23:02 EDT
*** cdt git genie on behalf of Sergey Prigogin ***

    Bug 359905 - Invalid formatting of comment in enum.

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=371bca30f374dbfc19934854c28bd28c61edc674