Fixed #6546 (False positive uselessAssignmentPtrArg - triggered by throw?)

This commit is contained in:
Robert Reif 2015-02-28 16:07:43 +01:00 committed by Daniel Marjamäki
parent 449b88aa0c
commit 27388c3696
1 changed files with 4 additions and 1 deletions

View File

@ -1320,8 +1320,11 @@ bool SymbolDatabase::isFunction(const Token *tok, const Scope* outerScope, const
return false; return false;
// skip over return type // skip over return type
if (Token::Match(tok1, "%name%")) if (Token::Match(tok1, "%name%")) {
if (tok1->str() == "return")
return false;
tok1 = tok1->previous(); tok1 = tok1->previous();
}
// skip over qualification // skip over qualification
while (Token::simpleMatch(tok1, "::")) { while (Token::simpleMatch(tok1, "::")) {