Removed false positives

This commit is contained in:
Daniel Marjamäki 2008-02-22 07:26:10 +00:00
parent 6100b19640
commit 6e2e624bce
1 changed files with 16 additions and 4 deletions

View File

@ -262,10 +262,22 @@ void CheckConstructors()
// There's no class constructor
if ( CheckCodingStyle )
{
std::ostringstream ostr;
ostr << FileLine(tok1);
ostr << " The class '" << classname << "' has no constructor";
ReportErr(ostr.str());
// Check that all member variables are initialized..
struct VAR *varlist = ClassChecking_GetVarList(classname);
if ( varlist )
{
std::ostringstream ostr;
ostr << FileLine(tok1);
ostr << " The class '" << classname << "' has no constructor";
ReportErr(ostr.str());
}
// Delete the varlist..
while (varlist)
{
struct VAR *nextvar = varlist->next;
delete varlist;
varlist = nextvar;
}
}
tok1 = findtoken( tok1->next, pattern_classname );