mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 21:55:39 +08:00
Add check for non-NULL Variable with a NULL Type.
llvm-svn: 147149
This commit is contained in:
@@ -213,7 +213,12 @@ Value::GetValueByteSize (clang::ASTContext *ast_context, Error *error_ptr)
|
||||
|
||||
case eContextTypeVariable: // Variable *
|
||||
if (GetVariable())
|
||||
byte_size = GetVariable()->GetType()->GetByteSize();
|
||||
{
|
||||
if (GetVariable()->GetType())
|
||||
byte_size = GetVariable()->GetType()->GetByteSize();
|
||||
else if (error_ptr)
|
||||
error_ptr->SetErrorString ("Can't determine byte size with NULL Type *.");
|
||||
}
|
||||
else if (error_ptr)
|
||||
error_ptr->SetErrorString ("Can't determine byte size with NULL Variable *.");
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user