[Lldb-commits] [lldb] r153201 - in /lldb/trunk/source/Expression: ClangASTSource.cpp ClangExpressionDeclMap.cpp
Sean Callanan
scallanan at apple.com
Wed Mar 21 10:13:21 PDT 2012
Author: spyffe
Date: Wed Mar 21 12:13:20 2012
New Revision: 153201
URL: http://llvm.org/viewvc/llvm-project?rev=153201&view=rev
Log:
Added some hardening to make sure that we don't
use QualType contents unchecked.
Modified:
lldb/trunk/source/Expression/ClangASTSource.cpp
lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
Modified: lldb/trunk/source/Expression/ClangASTSource.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangASTSource.cpp?rev=153201&r1=153200&r2=153201&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangASTSource.cpp (original)
+++ lldb/trunk/source/Expression/ClangASTSource.cpp Wed Mar 21 12:13:20 2012
@@ -1349,6 +1349,8 @@
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(),
Modified: lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp?rev=153201&r1=153200&r2=153201&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp Wed Mar 21 12:13:20 2012
@@ -2902,6 +2902,9 @@
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))
More information about the lldb-commits
mailing list