| Summary: | CDT: code formatter does not work as expected when complicate macro precedes formatted code | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Yonatan <yyakirevich> |
| Component: | cdt-editor | Assignee: | Anton Leherbauer <aleherb+eclipse> |
| Status: | RESOLVED FIXED | QA Contact: | Anton Leherbauer <aleherb+eclipse> |
| Severity: | normal | ||
| Priority: | P3 | CC: | cdtdoug, yevshif |
| Version: | 8.0 | ||
| Target Milestone: | 8.0.2 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
Fixed in cdt_8_0 and master. *** cdt git genie on behalf of Anton Leherbauer ***
Bug 359658 - code formatter does not work as expected when complicate macro precedes formatted code
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=e7f50acc252c66de101203cf9b901c57ff52e736
*** cdt git genie on behalf of Anton Leherbauer ***
Bug 359658 - code formatter does not work as expected when complicate macro precedes formatted code
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=63cb434f4c810665682425085f04811a29154586
|
Build Identifier: 20110615-0604 When the below "if..." is formmated (using ctrl-shift F): #define TESTING(m) ;do{}while(0) TESTING(1); if( Test(a ) != 1) { status = ERROR; } The result is if( Test(a ) != 1) { status = ERROR; } where as, when the code does not have the macro like so: #define TESTING(m) ;do{}while(0) //TESTING(1); if( Test(a ) != 1) { status = ERROR; } Then the "if" is formmated correctly: if(Test(a) != 1) { status = ERROR; } Please note that though this example is somewhat exotic, this is a minimization of a real-life case, which is affecting all formatting of our project. Thanks! :-) Reproducible: Always Steps to Reproduce: 1. See exact senario above.