diff options
| -rw-r--r-- | lldb/source/Expression/ClangASTSource.cpp | 2 | ||||
| -rw-r--r-- | lldb/source/Expression/ClangExpressionDeclMap.cpp | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/lldb/source/Expression/ClangASTSource.cpp b/lldb/source/Expression/ClangASTSource.cpp index d50e80854e2..08f63b5c8f8 100644 --- a/lldb/source/Expression/ClangASTSource.cpp +++ b/lldb/source/Expression/ClangASTSource.cpp @@ -1349,6 +1349,8 @@ NameSearchContext::AddVarDecl(void *type) clang::NamedDecl * NameSearchContext::AddFunDecl (void *type) { + assert (type && "Type for variable must be non-NULL!"); + clang::FunctionDecl *func_decl = FunctionDecl::Create (*m_ast_source.m_ast_context, const_cast<DeclContext*>(m_decl_context), SourceLocation(), diff --git a/lldb/source/Expression/ClangExpressionDeclMap.cpp b/lldb/source/Expression/ClangExpressionDeclMap.cpp index ccb5266dfbd..dd6a80b7d91 100644 --- a/lldb/source/Expression/ClangExpressionDeclMap.cpp +++ b/lldb/source/Expression/ClangExpressionDeclMap.cpp @@ -2902,6 +2902,9 @@ ClangExpressionDeclMap::AddOneVariable (NameSearchContext &context, VariableSP v clang::QualType parser_opaque_type = QualType::getFromOpaquePtr(pt.GetOpaqueQualType()); + if (parser_opaque_type.isNull()) + return; + if (const clang::Type *parser_type = parser_opaque_type.getTypePtr()) { if (const TagType *tag_type = dyn_cast<TagType>(parser_type)) |

