Symbol database: improved handling of out of line functions returning function pointers

This commit is contained in:
Robert Reif 2010-11-06 13:31:56 +01:00 committed by Daniel Marjamäki
parent c49a8a99a3
commit 0205498a12
1 changed files with 17 additions and 0 deletions

View File

@ -246,6 +246,23 @@ void CheckClass::addIfFunction(SpaceInfo **info, const Token **tok)
else else
addNewFunction(info, tok); addNewFunction(info, tok);
} }
// function returning function pointer with body
else if (Token::simpleMatch(argStart->link(), ") ) (") &&
Token::Match(argStart->link()->tokAt(2)->link(), ") const| {"))
{
const Token *tok1 = funcStart;
// class function
if (tok1->previous()->str() == "::")
addFunction(info, &tok1);
// regular function
else
addNewFunction(info, &tok1);
*tok = tok1;
}
} }
} }