Fixed #7246 (crash: CheckType::checkLongCast())
This commit is contained in:
parent
9f6890512c
commit
17ab0a4e9a
|
@ -255,7 +255,7 @@ void CheckType::checkLongCast()
|
||||||
if (tok->str() == "return") {
|
if (tok->str() == "return") {
|
||||||
if (Token::Match(tok->astOperand1(), "<<|*")) {
|
if (Token::Match(tok->astOperand1(), "<<|*")) {
|
||||||
const ValueType *type = tok->astOperand1()->valueType();
|
const ValueType *type = tok->astOperand1()->valueType();
|
||||||
if (type->type == ValueType::Type::INT && type->pointer == 0U && type->originalTypeName.empty())
|
if (type && type->type == ValueType::Type::INT && type->pointer == 0U && type->originalTypeName.empty())
|
||||||
ret = tok;
|
ret = tok;
|
||||||
}
|
}
|
||||||
// All return statements must have problem otherwise no warning
|
// All return statements must have problem otherwise no warning
|
||||||
|
|
Loading…
Reference in New Issue