Fixed #867 (unused member function warning)

This commit is contained in:
Daniel Marjamäki 2009-10-30 15:00:13 +01:00
parent 2cf849a9b8
commit feb065abc8
2 changed files with 12 additions and 1 deletions

View File

@ -110,7 +110,7 @@ void CheckUnusedFunctions::parseTokens(const Tokenizer &tokenizer)
else if (Token::Match(tok, "[;{}.,()[=+-/&|!?:] %var% [(),;:}]"))
funcname = tok->next();
else if (Token::Match(tok, "[(,] & %var% :: %var% [,)]"))
else if (Token::Match(tok, "[=(,] & %var% :: %var% [,);]"))
funcname = tok->tokAt(4);
else

View File

@ -119,6 +119,17 @@ private:
" return 0\n"
"}\n");
ASSERT_EQUALS("", errout.str());
check("namespace abc {\n"
"void foo() { }\n"
"};\n"
"\n"
"int main()\n"
"{\n"
" f = &abc::foo;\n"
" return 0\n"
"}\n");
ASSERT_EQUALS("", errout.str());
}
void template1()