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

Bug 344379

Summary: Code Style format error
Product: [Tools] CDT Reporter: Loaden <loaden>
Component: cdt-editorAssignee: Anton Leherbauer <aleherb+eclipse>
Status: RESOLVED FIXED QA Contact: Anton Leherbauer <aleherb+eclipse>
Severity: normal    
Priority: P3 CC: cdtdoug, loaden, yevshif
Version: 8.0   
Target Milestone: 8.0.1   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Code Style config file
none
Test file none

Description Loaden CLA 2011-04-30 12:49:30 EDT
Build Identifier: I20110428-0848

This is the test code:

#define _T(x)      x

#define WS_OVERLAPPED       0x00000000L
#define WS_POPUP            0x80000000L
#define WS_CHILD            0x40000000L
#define WS_MINIMIZE         0x20000000L
#define WS_VISIBLE          0x10000000L
#define WS_DISABLED         0x08000000L
#define WS_CLIPSIBLINGS     0x04000000L

void testFunctionForCodeStyleErrorReport(bool b, const char* s, int i, const char* msg, int j)
{
}

int main()
{
    testFunctionForCodeStyleErrorReport(true,
                                        _T("testFunctionForCodeStyleErrorReport"),
                                        WS_VISIBLE | WS_POPUP | WS_MINIMIZE,
                                        _T("test"),
                                        8);
    return 0;
}

It failed to formatted the code. 
The reason is :
WS_VISIBLE | WS_POPUP | WS_MINIMIZE,

If change to :
WS_VISIBLE,

Then formatted well!

Reproducible: Always
Comment 1 Loaden CLA 2011-04-30 12:50:37 EDT
Created attachment 194425 [details]
Code Style config file
Comment 2 Loaden CLA 2011-04-30 12:51:25 EDT
Created attachment 194426 [details]
Test file
Comment 3 Anton Leherbauer CLA 2011-08-05 08:32:50 EDT
Fixed in master and 8.0.1.
Comment 4 CDT Genie CLA 2011-08-05 09:23:02 EDT
*** cdt git genie on behalf of Anton Leherbauer ***

    Bug 344379 - Code Style format error

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=c118acdaa6b38ed7b50194c4ec483d82d6b99364
Comment 5 CDT Genie CLA 2011-08-05 09:23:03 EDT
*** cdt git genie on behalf of Anton Leherbauer ***

    Bug 344379 - Code Style format error

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