summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/ClangExpressionDeclMap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Expression/ClangExpressionDeclMap.cpp')
-rw-r--r--lldb/source/Expression/ClangExpressionDeclMap.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lldb/source/Expression/ClangExpressionDeclMap.cpp b/lldb/source/Expression/ClangExpressionDeclMap.cpp
index f2d2bc96248..b6427cc7c08 100644
--- a/lldb/source/Expression/ClangExpressionDeclMap.cpp
+++ b/lldb/source/Expression/ClangExpressionDeclMap.cpp
@@ -1220,6 +1220,14 @@ ClangExpressionDeclMap::GetVariableValue
{
type_to_use = GuardedCopyType(parser_ast_context, var_ast_context, var_opaque_type);
+ if (!type_to_use)
+ {
+ if (log)
+ log->Printf("Couldn't copy a variable's type into the parser's AST context");
+
+ return NULL;
+ }
+
if (parser_type)
*parser_type = TypeFromParser(type_to_use, parser_ast_context);
}
@@ -1271,6 +1279,9 @@ ClangExpressionDeclMap::AddOneVariable(NameSearchContext &context,
&ut,
&pt);
+ if (!var_location)
+ return;
+
NamedDecl *var_decl = context.AddVarDecl(pt.GetOpaqueQualType());
ClangExpressionVariable &entity(m_found_entities.VariableAtIndex(m_found_entities.CreateVariable()));
OpenPOWER on IntegriCloud