exceptRethrowCopy: Fixed FP in Cppcheck
This commit is contained in:
parent
41cb925440
commit
ab14d2bc0f
|
@ -161,6 +161,12 @@ void CheckExceptionSafety::checkRethrowCopy()
|
|||
tok = tok->next()->link()->next()->link();
|
||||
if (!tok)
|
||||
break;
|
||||
} else if (Token::Match(tok, "%varid% .", varid)) {
|
||||
const Token *parent = tok->astParent();
|
||||
while (Token::simpleMatch(parent->astParent(), "."))
|
||||
parent = parent->astParent();
|
||||
if (Token::Match(parent->astParent(), "%assign%|++|--|(") && parent == parent->astParent()->astOperand1())
|
||||
break;
|
||||
} else if (Token::Match(tok, "throw %varid% ;", varid))
|
||||
rethrowCopyError(tok, tok->strAt(1));
|
||||
}
|
||||
|
|
|
@ -1836,7 +1836,7 @@ static ExprEngine::ValuePtr executeFunctionCall(const Token *tok, Data &data)
|
|||
} catch (BugHuntingException &e) {
|
||||
data.errorPath.pop_back();
|
||||
e.tok = tok;
|
||||
throw e; // cppcheck-suppress exceptRethrowCopy
|
||||
throw e;
|
||||
}
|
||||
data.errorPath.pop_back();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue