Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 356682 - Constructor with static_cast and ::operator new in its initializer list formats incorrectly
Summary: Constructor with static_cast and ::operator new in its initializer list forma...
Status: CLOSED DUPLICATE of bug 353974
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Anton Leherbauer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-04 13:09 EDT by Geoff Alexander CLA
Modified: 2011-09-06 05:17 EDT (History)
2 users (show)

See Also:


Attachments
Eclipse workspace containing small example illustrating the problem (221.27 KB, application/x-compressed-tar)
2011-09-04 13:09 EDT, Geoff Alexander CLA
no flags Details

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