Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 344379 - Code Style format error
Summary: Code Style format error
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 8.0.1   Edit
Assignee: Anton Leherbauer CLA
QA Contact: Anton Leherbauer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-30 12:49 EDT by Loaden CLA
Modified: 2011-08-05 09:23 EDT (History)
3 users (show)

See Also:


Attachments
Code Style config file (17.25 KB, text/xml)
2011-04-30 12:50 EDT, Loaden CLA
no flags Details
Test file (757 bytes, application/octet-stream)
2011-04-30 12:51 EDT, Loaden CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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