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

Bug 356682

Summary: Constructor with static_cast and ::operator new in its initializer list formats incorrectly
Product: [Tools] CDT Reporter: Geoff Alexander <gdlxn>
Component: cdt-editorAssignee: Project Inbox <cdt-editor-inbox>
Status: CLOSED DUPLICATE QA Contact: Anton Leherbauer <aleherb+eclipse>
Severity: normal    
Priority: P3 CC: cdtdoug, gdlxn
Version: 8.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Eclipse workspace containing small example illustrating the problem none

Description Geoff Alexander CLA 2011-09-04 13:09:07 EDT
Created attachment 202720 [details]
Eclipse workspace containing small example illustrating the problem

I have attached a Eclipse workspace containing a small example illustrating the problem.  In ExampleClassXXXXXX.hpp the ExampleClassXXXXXX(myIntXXXXXXXXXXXX_type aaaaaaaa) constructor formats incorrectly as

      inline ExampleClassXXXXXX(myIntXXXXXXXXXXXX_type aaaaaaaa) :
          _aaaaaaaa(aaaaaaaa), _bbbb(0), _ccc(
              static_cast<InnerClassXXXXXXXXXX*>(::operator new(
                  aaaaaaaa * sizeof(InnerClassXXXXXXXXXX)))){
            }

Also subsequent methods and data members are incorrectly formatted:

            private:
            inline ExampleClassXXXXXX(const ExampleClassXXXXXX& vvm) {
            }

            protected:
            inline ~ExampleClassXXXXXX() {
              ::operator delete(static_cast<void*> (_ccc));
            }

            protected:
            myIntXXXXXXXXXXXX_type _aaaaaaaa;

            protected:
            myIntXXXXXXXXXXXX_type _bbbb;

            protected:
            InnerClassXXXXXXXXXX* _ccc;
Comment 1 Anton Leherbauer CLA 2011-09-06 05:17:30 EDT

*** This bug has been marked as a duplicate of bug 353974 ***