Attempt to fix crashes when variable valueType is nullptr. This can happen when decltype is used on unknown type
This commit is contained in:
parent
809cec2b58
commit
ad0eb6108b
|
@ -1557,6 +1557,8 @@ bool CheckUnusedVar::isVariableWithoutSideEffects(const Variable& var)
|
|||
if (!isRecordTypeWithoutSideEffects(variableType))
|
||||
return false;
|
||||
} else {
|
||||
if (WRONG_DATA(!var.valueType(), var.typeStartToken()))
|
||||
return false;
|
||||
ValueType::Type valueType = var.valueType()->type;
|
||||
if ((valueType == ValueType::Type::UNKNOWN_TYPE) || (valueType == ValueType::Type::NONSTD))
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue