mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 01:58:44 +08:00
Ran the static analyzer on the codebase and found a few things.
llvm-svn: 160338
This commit is contained in:
@@ -2344,8 +2344,10 @@ ValueObject::GetValuesForExpressionPath(const char* expression,
|
||||
ValueObjectSP final_value = ret_val->Dereference(error);
|
||||
if (error.Fail() || !final_value.get())
|
||||
{
|
||||
*reason_to_stop = ValueObject::eExpressionPathScanEndReasonDereferencingFailed;
|
||||
*final_value_type = ValueObject::eExpressionPathEndResultTypeInvalid;
|
||||
if (reason_to_stop)
|
||||
*reason_to_stop = ValueObject::eExpressionPathScanEndReasonDereferencingFailed;
|
||||
if (final_value_type)
|
||||
*final_value_type = ValueObject::eExpressionPathEndResultTypeInvalid;
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
@@ -2361,8 +2363,10 @@ ValueObject::GetValuesForExpressionPath(const char* expression,
|
||||
ValueObjectSP final_value = ret_val->AddressOf(error);
|
||||
if (error.Fail() || !final_value.get())
|
||||
{
|
||||
*reason_to_stop = ValueObject::eExpressionPathScanEndReasonTakingAddressFailed;
|
||||
*final_value_type = ValueObject::eExpressionPathEndResultTypeInvalid;
|
||||
if (reason_to_stop)
|
||||
*reason_to_stop = ValueObject::eExpressionPathScanEndReasonTakingAddressFailed;
|
||||
if (final_value_type)
|
||||
*final_value_type = ValueObject::eExpressionPathEndResultTypeInvalid;
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
@@ -3770,9 +3774,9 @@ ValueObject::EvaluationPoint::SyncWithProcessState()
|
||||
if (current_mod_id.GetStopID() == 0)
|
||||
return false;
|
||||
|
||||
bool changed;
|
||||
|
||||
if (m_mod_id.IsValid())
|
||||
bool changed = false;
|
||||
const bool was_valid = m_mod_id.IsValid();
|
||||
if (was_valid)
|
||||
{
|
||||
if (m_mod_id == current_mod_id)
|
||||
{
|
||||
@@ -3804,6 +3808,7 @@ ValueObject::EvaluationPoint::SyncWithProcessState()
|
||||
{
|
||||
// We used to have a frame, but now it is gone
|
||||
SetInvalid();
|
||||
changed = was_valid;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3811,6 +3816,7 @@ ValueObject::EvaluationPoint::SyncWithProcessState()
|
||||
{
|
||||
// We used to have a thread, but now it is gone
|
||||
SetInvalid();
|
||||
changed = was_valid;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user