Fixed #6571 (Library::isNotLibraryFunction: Return true for methods)
This commit is contained in:
parent
92de2a3ca3
commit
2d8a6c7b89
|
@ -681,9 +681,12 @@ const Library::Container* Library::detectContainer(const Token* typeStart) const
|
||||||
// returns true if ftok is not a library function
|
// returns true if ftok is not a library function
|
||||||
bool Library::isNotLibraryFunction(const Token *ftok) const
|
bool Library::isNotLibraryFunction(const Token *ftok) const
|
||||||
{
|
{
|
||||||
|
// methods are not library functions
|
||||||
// called from tokenizer, ast is not created properly yet
|
// called from tokenizer, ast is not created properly yet
|
||||||
if (Token::Match(ftok->previous(),"::|."))
|
if (Token::Match(ftok->previous(),"::|."))
|
||||||
return true;
|
return true;
|
||||||
|
if (ftok->function() && ftok->function()->nestedIn && ftok->function()->nestedIn->type != Scope::eGlobal)
|
||||||
|
return true;
|
||||||
|
|
||||||
// variables are not library functions.
|
// variables are not library functions.
|
||||||
if (ftok->varId())
|
if (ftok->varId())
|
||||||
|
|
Loading…
Reference in New Issue