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

Bug 360223

Summary: [c++] Failure to identify copy constructor
Product: [Tools] CDT Reporter: Markus Schorn <mschorn.eclipse>
Component: cdt-parserAssignee: Markus Schorn <mschorn.eclipse>
Status: RESOLVED FIXED QA Contact: Markus Schorn <mschorn.eclipse>
Severity: normal    
Priority: P3 CC: cdtdoug
Version: 8.0   
Target Milestone: 8.1.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Markus Schorn CLA 2011-10-07 08:25:41 EDT
In the following two examples we don't detect the user-defined copy-constructor and add the implicit one:

   template<typename T> struct C {
      C(const C<T>& c) {}
   };

   struct D {
      typedef const D& TD;
      D(TD c) {}
   };
Comment 1 Markus Schorn CLA 2011-10-31 09:25:29 EDT
Added testcase and fix.
Comment 2 CDT Genie CLA 2011-10-31 10:23:01 EDT
*** cdt git genie on behalf of Markus Schorn ***

    Bug 360223: Detection of user-defined copy constructor.

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