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

Bug 327066

Summary: static analyser must show warning for typedefed constructor call with wrong parameters.
Product: [Tools] CDT Reporter: Vasiliy Dybala <dibalavs>
Component: cdt-codanAssignee: Sergey Prigogin <eclipse.sprigogin>
Status: RESOLVED FIXED QA Contact: Elena Laskavaia <elaskavaia.cdt>
Severity: enhancement    
Priority: P3 CC: cdtdoug, eclipse.sprigogin, yevshif, zeratul976
Version: 8.0   
Target Milestone: 8.2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Vasiliy Dybala CLA 2010-10-06 03:03:55 EDT
Build Identifier: 201009242334

1. write code:
class B
{
public:
  B(int, char, int){}
};

class D : public B
{
  typedef B Super;
public:
  D() : Super()
  {}
};

Codan does not show any warnings/errors in initialization list "Super()" but this code wouldn't compile because constructor B() must have 3 parameters. 

Reproducible: Always

Steps to Reproduce:
1. launch eclipse
2. turn on all codan checkers
3. write code.
Comment 1 Nathan Ridge CLA 2013-08-24 18:09:06 EDT
This has since been fixed. I do get a codan error for this code with Kepler.

(The wording of the error can be improved - I filed bug 336438 for this a while ago.)

I think this bug report can be closed.
Comment 2 Sergey Prigogin CLA 2013-08-24 22:18:14 EDT
Fixed a while ago.