CheckClass: Removed false positive "unused private function" for typedef (Bug 2220326)

This commit is contained in:
Daniel Marjamäki 2008-11-05 07:25:28 +00:00
parent 5e4a7fefe5
commit fd4b02e538
1 changed files with 6 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* /*
* c++check - c/c++ syntax checking * c++check - c/c++ syntax checking
* Copyright (C) 2007 Daniel Marjamäki * Copyright (C) 2007 Daniel Marjamäki
* *
@ -451,9 +451,11 @@ void CheckUnusedPrivateFunctions()
priv = false; priv = false;
else if (priv && indent_level == 1) else if (priv && indent_level == 1)
{ {
if (isalpha(tok->str[0]) && if ( Match(tok, "typedef %type% (") )
tok->next->str[0]=='(' && tok = gettok(tok, 2);
strcmp(tok->str,classname) != 0)
if (Match(tok, "%var% (") &&
!Match(tok,classname))
{ {
FuncList.push_back(tok->str); FuncList.push_back(tok->str);
} }