Fixed #867 (unused member function warning)
This commit is contained in:
parent
2cf849a9b8
commit
feb065abc8
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue